annotate Main/jungle-network/transaction/NetworkDefaultJungleTreeEditor.cs @ 29:f7616084d3ab

Continue to put on the created path.
author Kazuma Takeda
date Wed, 18 Jan 2017 21:02:24 +0900
parents 1f99e150f336
children 236a58985e22
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
1 using UnityEngine;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
2 using System.Collections;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
3 using System.Collections.Generic;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
4
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
5 namespace JungleDB {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
6 public class NetworkDefaultJungleTreeEditor : JungleTreeEditor {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
7 private readonly TransactionManager TxManager;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
8 private readonly TreeNode Root;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
9 private readonly TreeEditor Editor;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
10 private readonly string TreeName;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
11 private readonly TreeOperationLog Log;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
12 private bool ExportLog;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
13
29
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
14 private NodePath prevPath;
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
15
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
16 public NetworkDefaultJungleTreeEditor(string tname, TreeNode root, TransactionManager txMan, TreeEditor edit)
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
17 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
18 this.TreeName = tname;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
19 this.Root = root;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
20 this.TxManager = txMan;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
21 this.Editor = edit;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
22 this.Log = new DefaultTreeOperationLog();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
23 this.ExportLog = true;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
24 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
25
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
26 public NetworkDefaultJungleTreeEditor(string tname, TreeNode root, TransactionManager txMan, TreeEditor edit, TreeOperationLog log) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
27 this.TreeName = tname;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
28 this.Root = root;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
29 this.TxManager = txMan;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
30 this.Editor = edit;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
31 this.Log = log;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
32 this.ExportLog = true;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
33 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
34
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
35 public static NetworkDefaultJungleTreeEditor NewLocalTreeEditor(string tname, TreeNode root, TransactionManager txMan, TreeEditor edit) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
36 NetworkDefaultJungleTreeEditor treeEditor = new NetworkDefaultJungleTreeEditor(tname, root, txMan, edit, new DefaultTreeOperationLog());
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
37 treeEditor.ExportLog = false;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
38 return treeEditor;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
39 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
40
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
41 public static NetworkDefaultJungleTreeEditor NewLocalTreeEditor(string tname, TreeNode root, TransactionManager txMan, TreeEditor edit, TreeOperationLog log) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
42 NetworkDefaultJungleTreeEditor treeEditor = new NetworkDefaultJungleTreeEditor(tname, root, txMan, edit, log);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
43 treeEditor.ExportLog = false;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
44 return treeEditor;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
45 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
46
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
47
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
48 private Either<Error,JungleTreeEditor> TreeEditor(NodePath path, NodeEditor editor)
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
49 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
50 //LoggingNodeHook hook = new LoggingNodeHook(_e);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
51 Either<Error,LoggingNode> either = this.Editor.edit(this.Root, path, editor);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
52 if(either.isA()){
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
53 return DefaultEither<Error, JungleTreeEditor>.newA(either.a());
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
54 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
55
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
56 TreeNode newNode = either.b().getWrap();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
57 OperationLog newLog = either.b().getOperationLog();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
58
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
59 // IterableConverter.Converter<TreeOperation,NodeOperation> converter = new IterableConverter.Converter<TreeOperation,NodeOperation>(){
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
60 // public TreeOperation conv(NodeOperation _b){
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
61 // return new DefaultTreeOperation(_path,_b);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
62 // }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
63 // };
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
64
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
65 // I must fix this code.
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
66 IterableConverter<TreeOperation,NodeOperation>.Converter<TreeOperation,NodeOperation> converter = new InnerConverter(path);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
67
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
68 IEnumerable<TreeOperation> iterable = new IterableConverter<TreeOperation,NodeOperation>(newLog, converter);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
69 DefaultTreeOperationLog treeOperationLog = new DefaultTreeOperationLog(iterable,newLog.length());
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
70 TreeOperationLog newTreeOpLog = Log.append(treeOperationLog);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
71
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
72 JungleTreeEditor newEditor;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
73 if(this.ExportLog) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
74 newEditor = new NetworkDefaultJungleTreeEditor(this.TreeName, newNode, this.TxManager, this.Editor, newTreeOpLog);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
75 } else {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
76 newEditor = NetworkDefaultJungleTreeEditor.NewLocalTreeEditor(this.TreeName, newNode, TxManager, this.Editor, newTreeOpLog);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
77 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
78 return DefaultEither<Error, JungleTreeEditor>.newB(newEditor);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
79 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
80
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
81
29
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
82 public Either<Error,JungleTreeEditor> addNewChildAt(NodePath _path, int _pos) {
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
83 prevPath = _path.add (_pos);
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
84 AppendChildAt appendChildAt = new AppendChildAt(_pos);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
85 return this.TreeEditor(_path,appendChildAt);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
86 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
87
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
88 public Either<Error,JungleTreeEditor> deleteChildAt(NodePath _path, int _pos)
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
89 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
90 DeleteChildAt deleteChildAt = new DeleteChildAt(_pos);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
91 return this.TreeEditor(_path,deleteChildAt);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
92 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
93
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
94 public Either<Error,JungleTreeEditor> putAttribute(NodePath _path, string _key, byte[] _value)
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
95 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
96 PutAttribute putAttribute = new PutAttribute(_key,_value);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
97 return this.TreeEditor(_path,putAttribute);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
98 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
99
29
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
100 public Either<Error,JungleTreeEditor> putAttribute(string _key, byte[] _value)
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
101 {
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
102 PutAttribute putAttribute = new PutAttribute(_key,_value);
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
103 return this.TreeEditor(prevPath, putAttribute);
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
104 }
f7616084d3ab Continue to put on the created path.
Kazuma Takeda
parents: 20
diff changeset
105
20
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
106 public Either<Error,JungleTreeEditor> deleteAttribute(NodePath _path, string _key)
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
107 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
108 DeleteAttribute deleteAttribute = new DeleteAttribute(_key);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
109 return this.TreeEditor(_path,deleteAttribute);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
110 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
111
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
112 public Either<Error,JungleTreeEditor> edit(NodePath _path, NodeEditor _editor)
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
113 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
114 return this.TreeEditor(_path,_editor);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
115 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
116
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
117 public Either<Error,JungleTreeEditor> commit()
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
118 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
119 Either<Error,TransactionManager> either = TxManager.commit(this.Root, this.Log);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
120 if(either.isA()){
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
121 return DefaultEither<Error, JungleTreeEditor>.newA(either.a());
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
122 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
123 // if(this.ExportLog) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
124 // try {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
125 // putTreeOperationLog(this.Log);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
126 // } catch (IOException e) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
127 // return DefaultEither.newA(either.a());
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
128 // }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
129 // }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
130
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
131 TransactionManager newTxManager = either.b();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
132 JungleTreeEditor newTreeEditor = new NetworkDefaultJungleTreeEditor(this.TreeName, this.Root, newTxManager, this.Editor);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
133
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
134 return DefaultEither<Error, JungleTreeEditor>.newB(newTreeEditor);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
135 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
136
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
137 private string getID()
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
138 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
139 return this.TxManager.getUUID();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
140 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
141
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
142 private string getRevision()
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
143 {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
144 return this.TxManager.getRevision().ToString();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
145 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
146
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
147 public string getTreeName() {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
148 return this.TreeName;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
149 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
150
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
151 public TreeOperationLog getTreeOperationLog() {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
152 return this.Log;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
153 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
154
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
155 public void putTreeOperationLog(IEnumerable<TreeOperation> newLog) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
156 string uuid = getID();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
157 string treeName = getTreeName();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
158 string updaterName = getID();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
159 string revision = getRevision();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
160 putDataSegment(uuid, treeName, updaterName, newLog, revision);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
161 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
162
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
163 public void putDataSegment(string _uuid, string _treeName, string _updaterName, IEnumerable<TreeOperation> newLog, string nextRevision) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
164 // NetworkTreeOperationLog netLog = new NetworkTreeOperationLog(_uuid, _treeName,newLog);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
165 // CodeSegment cs = new LogPutCodeSegment(netLog);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
166 // cs.execute();
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
167 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
168
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
169 public Either<Error, JungleTreeEditor> replaceNewRootNode() {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
170 // TODO Auto-generated method stub
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
171 return null;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
172 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
173
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
174 public Either<Error, JungleTreeEditor> flushSuccess() {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
175 // TODO Auto-generated method stub
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
176 return null;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
177 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
178
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
179 public class InnerConverter : IterableConverter<TreeOperation,NodeOperation>.Converter<TreeOperation,NodeOperation>{
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
180 NodePath path;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
181
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
182 public InnerConverter(NodePath _path) {
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
183 path = _path;
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
184 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
185
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
186
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
187 public TreeOperation conv(NodeOperation _b){
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
188 return new DefaultTreeOperation(path,_b);
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
189 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
190 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
191 }
1f99e150f336 fix folder and add Object Mapper.
Kazuma Takeda
parents:
diff changeset
192 }