Mercurial > hg > Members > kazuma > jungle-ormapper
changeset 0:44465893e8b8
first Commit
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LICENSE Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,22 @@ +Copyright (c) 2014-2014 Shinji KONO, Kazuki Akamine, Shoshi Tamaki, Nobuyasu Ohoshiro, Yu Sugimoto, Tatsuki Kanagawa + Information Engineeering, University of the Ryukyus + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmark/find.js Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,16 @@ +function findDataLoop () { +var date_obj = new Date(); +var milliseconds = date_obj.getTime(); +for (var i = 1; i<= 50000; i++) { + var personData = db.person1.find({PersonId:"p:9"}).next(); + var roleId = personData.roleId +} +date_obj = new Date(); +print(date_obj.getTime() - milliseconds) +} + +function findData () { + var personVer = db.config.find({configVer:"v:1"}).next().PersonVer; + var personCollection = db.getCollection(personVer); + db.person1.find({PersonId:"p:9"}).next(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmark/insert.js Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,13 @@ +function insertData(personCount) { +db.person1.drop(); +for (var i = 1; i<= personCount ; i++) { + + var user = { + + PersonId: "p:" + String(i), + roleRefIds:"r:" + String(i)} + db.person1.insert(user); +} + +db.person1.createIndex({PersonId:1}); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build.gradle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,48 @@ +apply plugin: "java" + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' +version = '1.0' + +repositories { + mavenCentral() + maven { url "http://eaio.com/maven2" } + maven { url "http://repo.maven.apache.org/maven2" } +} + +dependencies { + compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.0.0' + compile "commons-collections:commons-collections:3.2.1" + compile "org.apache.maven.surefire:surefire-junit4:2.13" + compile "com.google.guava:guava:12.0" + compile fileTree(dir: 'lib', include: '*.jar') + compile "junit:junit:4.7" + compile group: 'org.eclipse.jetty', name: 'jetty-server', version:'9.1.1.v20140108' + compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'9.2.1.v20140609' + compile group: 'org.hectorclient', name: 'hector-core', version:'1.1-2' + compile group: 'com.github.stephenc.eaio-uuid', name: 'uuid', version:'3.3.0' + compile(group: 'org.apache.cassandra', name: 'cassandra-all', version:'1.2.1') { + exclude(module: 'slf4j-log4j12') + exclude(module: 'log4j') + } +} + + + + +jar { + manifest { + attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version + } + from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + archiveName = 'jungle-core.jar' +} + +uploadArchives { + repositories { + flatDir { + dirs '.' + } + } +}
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CassandraBulletinBoard$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CassandraBulletinBoard$2.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CassandraBulletinBoard$BoardMessageImpl.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CassandraBulletinBoard.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CreateBoardMessageServlet.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/EditMessageUseGetServlet.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/IterableConverter$Converter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/IterableConverter$IteratorConverter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/JungleBulletinBoard$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/JungleBulletinBoard$2.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/JungleBulletinBoard$BoardMessageImpl.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/JungleBulletinBoard.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/bbs/ShowBoardMessageServlet.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/benchMark/Data/TreeMapBenchMark.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/benchMark/JungleBenchMark.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/DefaultComparator.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/RotateParent.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/rebuildNode.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/ChangeListReader.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/ChangeListWriter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultChangeListReader.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultChangeListWriter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultJournal.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultJournalWriter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/NullJournal$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/NullJournal$NullChangeListReader.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/persistent/NullJournal$NullChangeListWriter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/DefaultNodePath.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/DefaultTreeEditor.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/IndexTreeEditor.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNodeAttributes.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNodeChildren.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/DefaultOperationLog.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/DefaultTreeOperationLog.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/LoggingAttributes.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/LoggingChildren.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/LoggingNode.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/OperationLog.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/TreeOperationLog.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/index/IndexCreater.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/index/ParentIndex.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/AppendChildAtOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DefaultTreeOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteAttributeOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteChildAtOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/NodeOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/PutAttributeOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/ReplaceRootNodeOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/TreeOperation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/AppendChildAt.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteAttribute.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteChildAt.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/NodeEditor.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/NodeEditorError.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/PutAttribute.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/replaceRootNodeAt.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/AbstractTreeMapThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/DataBaseBenchMarkThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/TatsukiTreeMapGetThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/UtilTreeMapGetThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/findMongoAttributeThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/findTreeAttributeThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/test/readTreeAttributeThread.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultJungleTreeEditor$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultJungleTreeEditor.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTransactionManager$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTransactionManager.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeContext.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNode.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNodeAttribute.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNodeChildren.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/transaction/TransactionManager.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultEvaluation.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultEvaluator.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser$2.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser$3.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser$4.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/InterfaceTraverser$1.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/InterfaceTraverser.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/traverser/TraverserError.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/util/IterableConverter$Converter.class has changed
Binary file build/classes/main/jp/ac/u_ryukyu/ie/cr/jungle/util/IterableConverter$IteratorConverter.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/data/treemap/TreeNodeIteratorTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/core/impl/treeeditor/DefaultTreeEditorTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/AppendChildAtTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteAttributeAtTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteChildAtTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/PutAttributeTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/ReplaceRootNodeAt.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultAttributesTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultChildrenTest.class has changed
Binary file build/classes/test/jp/ac/u_ryukyu/ie/cr/jungle/traverse/InterfaceTraverserTest.class has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/JungleMindmap.mm Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,240 @@ +<map version="1.0.1"> +<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net --> +<node CREATED="1409726078288" ID="ID_647478089" MODIFIED="1409912802514"> +<richcontent TYPE="NODE"><html> + <head> + + </head> + <body> + <p> + Jungle + </p> + </body> +</html></richcontent> +<node CREATED="1409726154557" ID="ID_751550789" MODIFIED="1409726198467" POSITION="right" TEXT="スケジュール"> +<node CREATED="1409726169906" HGAP="21" ID="ID_1745036704" MODIFIED="1409726235708" TEXT="9/15永山さん来沖" VSHIFT="-5"/> +<node CREATED="1409726198468" HGAP="21" ID="ID_41465836" MODIFIED="1409726228823" TEXT="9/18PCIプレゼンテーョン" VSHIFT="6"/> +<node CREATED="1409726286066" ID="ID_19901324" MODIFIED="1409726314038" TEXT="9/3junge読み会  "/> +</node> +<node CREATED="1409726242716" ID="ID_1717600301" MODIFIED="1409726252838" POSITION="left" TEXT="jungleの課題"> +<node CREATED="1409726253771" ID="ID_1381608182" MODIFIED="1409726257565" TEXT="リファクタリング"> +<node CREATED="1409726276236" ID="ID_1555795427" MODIFIED="1409726600088" TEXT="古い方を先に読んでその後新しい方を読む"/> +<node CREATED="1409726355435" ID="ID_133639792" MODIFIED="1409726422510" TEXT="attibuteのノード等を分けている意味がわからない"/> +<node CREATED="1409726400578" FOLDED="true" ID="ID_209791619" MODIFIED="1409727249087" TEXT="ジェネリックの扱いがわからない(children等)"> +<node CREATED="1409726444811" ID="ID_1259286182" MODIFIED="1409726450869" TEXT="                      "/> +<node CREATED="1409726451499" ID="ID_1180276559" MODIFIED="1409726451499" TEXT=""/> +</node> +<node CREATED="1409726455123" ID="ID_346888518" MODIFIED="1409726477294" TEXT="名前とTreeの対応をJungleのTreeに直す"> +<node CREATED="1409726480115" ID="ID_1560015410" MODIFIED="1409726505822" TEXT="なのでJungleをAVLに"/> +<node CREATED="1409726517683" ID="ID_1128117081" MODIFIED="1409726532614" TEXT="更新をatomicにしなくて大丈夫か?"/> +</node> +<node CREATED="1409906422242" ID="ID_92678336" MODIFIED="1409907291863" TEXT="Logを取るノードと取らないNodeを分ける" VSHIFT="81"> +<node CREATED="1409907299090" ID="ID_156102389" MODIFIED="1409907325388" TEXT="LoggingをするEditor"/> +<node CREATED="1409907325760" ID="ID_1693431989" MODIFIED="1409907338580" TEXT="Indexを更新するEditor"/> +<node CREATED="1409907339120" ID="ID_1167306471" MODIFIED="1409907353179" TEXT="Nodeを更新するだけのEditor"/> +</node> +</node> +<node CREATED="1409726560355" HGAP="32" ID="ID_1680643421" MODIFIED="1409906495696" TEXT="Aliceの部分でIOとは別にして優先度を上げる" VSHIFT="13"> +<node CREATED="1409726580851" ID="ID_70332820" MODIFIED="1409906498998" TEXT="ログの書き出しも" VSHIFT="2"/> +</node> +<node CREATED="1409726600088" ID="ID_142965815" MODIFIED="1409727174343" TEXT="API" VSHIFT="18"> +<node CREATED="1409726606857" ID="ID_405344625" MODIFIED="1409726622494" TEXT="基本的にパスでしかアクセスできないので"/> +<node CREATED="1409726624219" ID="ID_1368915826" MODIFIED="1409726642662" TEXT="indexでアクセスできるようにしたい"> +<node CREATED="1409726651188" ID="ID_763950066" MODIFIED="1409906505790" TEXT="Indexの再構成が欲しい" VSHIFT="2"/> +</node> +<node CREATED="1409726637570" ID="ID_1840769401" MODIFIED="1409726854710" TEXT="WEBからアクセスするAPIが欲しい"/> +<node CREATED="1409726842808" ID="ID_823399931" MODIFIED="1409726997548" TEXT="KeyをForgetするAPI"> +<node CREATED="1409726998097" ID="ID_1404724140" MODIFIED="1409727013630" TEXT=" mergeする可能性があるKeyだけ残す"/> +</node> +<node CREATED="1409726799739" ID="ID_1771872050" MODIFIED="1409727205486" TEXT="アクセスしたときに部分的に取ってくるAPIと部分的に取ってくるAPIが欲しい"/> +<node CREATED="1409908104921" ID="ID_515208912" MODIFIED="1409912737202" TEXT="検索のAPI"> +<node CREATED="1409908119601" ID="ID_308661535" MODIFIED="1409908142364" TEXT="getTraversaer"/> +<node CREATED="1409908143057" ID="ID_767737454" MODIFIED="1409912827805" TEXT="interface traverser"> +<node CREATED="1409912059464" ID="ID_1786348845" MODIFIED="1409912122574" TEXT="Attribute,nameの値が"kanagawa"であるものを探す"/> +<node CREATED="1409912127515" ID="ID_1936001294" MODIFIED="1409912138492" TEXT="count"> +<node CREATED="1409912143369" ID="ID_1101250261" MODIFIED="1409912287350" TEXT="Listがiteratorが返ってくる" VSHIFT="2"/> +</node> +<node CREATED="1409912195387" ID="ID_1677264420" MODIFIED="1410168480769"> +<richcontent TYPE="NODE"><html> + <head> + + </head> + <body> + <p> + orderBy + </p> + </body> +</html> +</richcontent> +</node> +<node CREATED="1409912254809" ID="ID_1535341119" MODIFIED="1409912270524" TEXT="distinct"/> +<node CREATED="1409912297489" ID="ID_185517541" MODIFIED="1409912300012" TEXT="sum"/> +<node CREATED="1409912303321" ID="ID_1425057782" MODIFIED="1409912312172" TEXT="複数のTreeのTraverse"> +<node CREATED="1409912382240" ID="ID_1596998457" MODIFIED="1409967293540" TEXT="複数のTreeからAttribute,"name"の値が等しいもののリストを持ってくるプログラムを作ってくる(宿題)" VSHIFT="1"/> +</node> +</node> +<node CREATED="1409912823732" ID="ID_68210354" MODIFIED="1409912881846" TEXT="interfaceTraverserからIndexが必要なAttributeを取り出す(宿題)"> +<node CREATED="1410514003798" ID="ID_363051278" MODIFIED="1410516434692" TEXT="interfaceにIndexが必要なattribute名と値の組のリストを入れる"> +<node CREATED="1410514878896" ID="ID_1404969445" MODIFIED="1410514915483" TEXT="andとorを用意する"/> +</node> +<node CREATED="1410514060103" ID="ID_633567682" MODIFIED="1410516523105" TEXT="× reflectionを使って自動で検出する"/> +<node CREATED="1410514082872" ID="ID_601182746" MODIFIED="1410516519954" TEXT="x Nodeへのアクセスを工夫して検出する"/> +<node CREATED="1410514507063" ID="ID_831315054" MODIFIED="1410516526595" TEXT="x indexする文字列を計算する関数を定義する"/> +</node> +<node CREATED="1409908160464" ID="ID_541009496" MODIFIED="1409908289626"> +<richcontent TYPE="NODE"><html> + <head> + + </head> + <body> + <p> + output + </p> + </body> +</html></richcontent> +<node CREATED="1409908164657" ID="ID_994155079" MODIFIED="1409910871356" TEXT="NodeとPathのリストのiterater" VSHIFT="2"/> +</node> +<node CREATED="1409912737817" HGAP="21" ID="ID_1598031941" MODIFIED="1410513560819" TEXT="indexを削除するAPI" VSHIFT="-5"/> +</node> +<node CREATED="1409913383955" ID="ID_653968339" MODIFIED="1409913399484" TEXT="誰が検索したかを保存するAPI"/> +</node> +<node CREATED="1409906099431" HGAP="22" ID="ID_1697852268" MODIFIED="1409906130605" TEXT="indexをつける" VSHIFT="50"> +<node CREATED="1409906161185" HGAP="18" ID="ID_37822884" MODIFIED="1410507481090" TEXT="indexは2重でkeyとAttributeのTreeMapとAttributeとList<TreeNode>を持つ" VSHIFT="-10"/> +<node CREATED="1409906200281" HGAP="21" ID="ID_957989771" MODIFIED="1409906786182" TEXT="各version毎にindeがある" VSHIFT="-14"/> +<node CREATED="1409906235377" HGAP="18" ID="ID_1286646129" MODIFIED="1409906798789" TEXT="indexはfjのTreeHashMapを使う" VSHIFT="-3"> +<node CREATED="1409912676387" ID="ID_1944162611" MODIFIED="1409912716086" TEXT="非破壊のindexを使いたい"/> +<node CREATED="1410516550614" ID="ID_39333260" MODIFIED="1410516587059" TEXT="indexはMD5(16文字)を使う"/> +</node> +<node CREATED="1409906326546" HGAP="22" ID="ID_1269584258" MODIFIED="1409906815222" TEXT="indexはattributeとNodeの二つを用意する" VSHIFT="-5"/> +<node CREATED="1409906387306" HGAP="22" ID="ID_63715775" MODIFIED="1409906810134" TEXT="indexを共有するといい" VSHIFT="-6"/> +<node CREATED="1409906610393" HGAP="19" ID="ID_29204462" MODIFIED="1409906820222" TEXT="indexがAVLTreeなのでJungleはAVLTreeにしなくていい"/> +<node CREATED="1410425105627" ID="ID_1101960859" MODIFIED="1410425112551" TEXT="Indexを作成する"> +<node CREATED="1410425117852" ID="ID_1991794291" MODIFIED="1410425263968" TEXT="指定されたAttribute でTraverser.find()する" VSHIFT="-1"/> +<node CREATED="1410425151354" ID="ID_181296442" MODIFIED="1410425266527" TEXT="見つかったNodeをTreeHashMapに登録する" VSHIFT="2"/> +<node CREATED="1410425345027" ID="ID_1854159529" MODIFIED="1410425427519" TEXT="TreeHashMapはfjなので毎回新しく作られるので最新のを返すようにする"/> +<node CREATED="1410514238087" ID="ID_1147421303" MODIFIED="1410514273371" TEXT="検索条件がANDの場合Indexを作るときに複数の値を組み合わせる"/> +<node CREATED="1410516631480" ID="ID_655505152" MODIFIED="1410516690959" TEXT="検索条件がorの場合はそれぞれのハッシュ値のうち小さい方を登録する"/> +<node CREATED="1410516692064" ID="ID_1181474823" MODIFIED="1410516729451" TEXT="とりあえず複数の属性のIndexを実装する"/> +</node> +<node CREATED="1410425435604" ID="ID_1483486563" MODIFIED="1410425451647" TEXT="木の変更にあわせてIndexを更新する"> +<node CREATED="1410425457404" ID="ID_1415789781" MODIFIED="1410425469510" TEXT="insert"> +<node CREATED="1410425514771" ID="ID_1914608257" MODIFIED="1410425525367" TEXT="何もしない"/> +</node> +<node CREATED="1410425469923" ID="ID_1732199164" MODIFIED="1410425471669" TEXT="delete"> +<node CREATED="1410425537836" ID="ID_1594525412" MODIFIED="1410425586049" TEXT="deleteでは対応したattributeがある場合はIndexから削除する"/> +</node> +<node CREATED="1410425479779" ID="ID_476181967" MODIFIED="1410425488151" TEXT="putAttribute"> +<node CREATED="1410425587826" ID="ID_304070760" MODIFIED="1410425675095" TEXT="putAttributeでは対応したattributeがindexにある場合更新する"/> +</node> +</node> +<node CREATED="1410425709500" ID="ID_1965057200" MODIFIED="1410425735335" TEXT="同じ値を持つ複数のNodeに対応する"/> +</node> +</node> +<node CREATED="1409726668370" ID="ID_204371770" MODIFIED="1409726690172" POSITION="right" TEXT="Matrix"> +<node CREATED="1409726674833" ID="ID_200755637" MODIFIED="1409726685246" TEXT="組織をtreeにするのは終わっている"> +<node CREATED="1409726686011" ID="ID_530305344" MODIFIED="1409726686011" TEXT=""/> +</node> +<node CREATED="1409726690173" ID="ID_1173609965" MODIFIED="1409726707813" TEXT="XACMLは勉強会"> +<node CREATED="1409726724451" ID="ID_744658833" MODIFIED="1409726734998" TEXT="オペレーションをJungleがちゃんとサポートしているか"/> +</node> +</node> +<node CREATED="1409726752851" HGAP="28" ID="ID_1096797544" MODIFIED="1409907420179" POSITION="left" TEXT="AssureNode" VSHIFT="43"> +<node CREATED="1409726765475" ID="ID_1507920801" MODIFIED="1409726773734" TEXT="Jungleとつなげる"/> +<node CREATED="1409726774355" ID="ID_105345677" MODIFIED="1409726796814" TEXT="編集コマンドをjungleに翻訳する"/> +</node> +<node CREATED="1411012020717" ID="ID_398179177" MODIFIED="1411012042698" POSITION="right" TEXT="9/18までの成果"> +<node CREATED="1411012046375" ID="ID_1760471121" MODIFIED="1411012156641" TEXT="組織構造をに木構造にした"/> +<node CREATED="1411012171503" ID="ID_10115181" MODIFIED="1411012232907" TEXT="組織構造図のBrowserを作成した"/> +<node CREATED="1411012217527" ID="ID_658316563" MODIFIED="1411012269169" TEXT="Jungleのリファクタリング"> +<node CREATED="1411012308263" ID="ID_1067800269" MODIFIED="1411012316514" TEXT="wrapperの削除"/> +<node CREATED="1411012317351" ID="ID_89156108" MODIFIED="1411012324442" TEXT="interfaceの削減"/> +<node CREATED="1411013540767" ID="ID_1148150156" MODIFIED="1411013564026" TEXT="jungleのAPIの一覧"/> +</node> +<node CREATED="1411012280303" ID="ID_1506351821" MODIFIED="1411012357354" TEXT="xacmlの調査"> +<node CREATED="1411012368647" ID="ID_1605669522" MODIFIED="1411012375584" TEXT="rule"/> +<node CREATED="1411012377525" ID="ID_409590963" MODIFIED="1411012381784" TEXT="context"/> +</node> +<node CREATED="1411012432485" ID="ID_973317332" MODIFIED="1411012464737" TEXT="JungleのQueryAPIの設計"> +<node CREATED="1411012472343" ID="ID_1801177319" MODIFIED="1411012478208" TEXT="getTraverser"/> +<node CREATED="1411012479277" ID="ID_550909148" MODIFIED="1411012505360" TEXT="Query Interface"/> +<node CREATED="1411012512101" ID="ID_636916479" MODIFIED="1411012515776" TEXT="Index"/> +</node> +<node CREATED="1411012529164" ID="ID_187998670" MODIFIED="1411012540666" TEXT="JungleのQueryAPIの実装"> +<node CREATED="1411012563319" ID="ID_1685410052" MODIFIED="1411012600168" TEXT="depth searchによるQuery"/> +<node CREATED="1411012620452" ID="ID_1294946451" MODIFIED="1411012628330" TEXT="Indexは今は後回し"/> +<node CREATED="1411012640535" ID="ID_920213328" MODIFIED="1411012655346" TEXT="lambda式の使用"/> +<node CREATED="1411013527502" ID="ID_1522079811" MODIFIED="1411013534842" TEXT="APIの実装例"/> +</node> +<node CREATED="1411012664631" ID="ID_685056734" MODIFIED="1411012752531" TEXT="maTrixの例題の作成"> +<node CREATED="1411012679735" ID="ID_931911457" MODIFIED="1411012700545" TEXT="例題のXACMLを用いた例題の作成"/> +<node CREATED="1411012712175" ID="ID_1690482361" MODIFIED="1411012730073" TEXT="プロトタイプの作成"/> +<node CREATED="1411013380994" ID="ID_1889496503" MODIFIED="1411013414154" TEXT="承認の理由をevidenceとして残す必要がある"/> +<node CREATED="1411013422887" ID="ID_1417892199" MODIFIED="1411013459049" TEXT="XACMLのPolicyをevidenceとする"/> +<node CREATED="1411013472685" ID="ID_300637545" MODIFIED="1411013505113" TEXT="業務規定集をJungleTreeに入れてその項目をevidenceとする"/> +</node> +<node CREATED="1411012753847" ID="ID_1102042475" MODIFIED="1411012759250" TEXT="現時点での評価"> +<node CREATED="1411012777806" ID="ID_135718459" MODIFIED="1411012796170" TEXT="Jungle上でmaTrixを実装できることがわかった"/> +<node CREATED="1411012803214" ID="ID_978365941" MODIFIED="1411012811802" TEXT="RDBに対する優位性"/> +</node> +<node CREATED="1411012762223" ID="ID_848782577" MODIFIED="1411012764218" TEXT="課題"> +<node CREATED="1411012819391" ID="ID_1018621700" MODIFIED="1411012842474" TEXT="Indexの実装"> +<node CREATED="1411013158197" ID="ID_130717179" MODIFIED="1411013177825" TEXT="Jungleの内部でon the flyにindexを作成する"/> +<node CREATED="1411013186199" ID="ID_358009521" MODIFIED="1411013210755" TEXT="create Indexの用なものは必要ない"/> +<node CREATED="1411013226855" ID="ID_1104458724" MODIFIED="1411013241538" TEXT="indexはJungleの一部ではない"/> +</node> +<node CREATED="1411012842870" ID="ID_1067709795" MODIFIED="1411012845466" TEXT="性能評価"/> +<node CREATED="1411012846350" ID="ID_276359834" MODIFIED="1411012867994" TEXT="JungleDBの設計手法"> +<node CREATED="1411013027631" ID="ID_1736556794" MODIFIED="1411013078514" TEXT="どこまで1つの木にするか"/> +<node CREATED="1411013101343" ID="ID_34477685" MODIFIED="1411013124840" TEXT="名前で木を分割するとupdateの競合が減る"/> +</node> +<node CREATED="1411012875431" ID="ID_1804463542" MODIFIED="1411012882202" TEXT="過去の履歴の検索"> +<node CREATED="1411012978143" ID="ID_1104758188" MODIFIED="1411013013666" TEXT="versionを特定したgetTreeByName"/> +<node CREATED="1411013264590" ID="ID_1229534696" MODIFIED="1411013321562" TEXT="予測可能な履歴の検索についてはあらかじめIndexを作る"/> +<node CREATED="1411013342862" ID="ID_1582989934" MODIFIED="1411013362577" TEXT="過去の履歴に対するindexはJungleTreeで作成する"/> +</node> +</node> +<node CREATED="1411013575999" ID="ID_1487585972" MODIFIED="1411013591961" TEXT="全体のストーリー"> +<node CREATED="1411013596703" ID="ID_1522480058" MODIFIED="1411013607905" TEXT="今回の結果"> +<node CREATED="1411013649633" ID="ID_1185631762" MODIFIED="1411013663354" TEXT="Jungle上にmaTrixが構築できそう"/> +</node> +<node CREATED="1411013757710" ID="ID_18661524" MODIFIED="1411013799681" TEXT="簡単なJungleの復習"> +<node CREATED="1411013808215" ID="ID_1573678199" MODIFIED="1411013819914" TEXT="Jungleが何だったか?"/> +<node CREATED="1411013820271" ID="ID_1003946204" MODIFIED="1411013826729" TEXT="非破壊で木構造"/> +<node CREATED="1411014639991" ID="ID_795570117" MODIFIED="1411014654538" TEXT="API(Query以外"/> +</node> +<node CREATED="1411013867031" ID="ID_1049017854" MODIFIED="1411013895426" TEXT="jungle上でのmaTrixの構成"/> +<node CREATED="1411013926472" ID="ID_1068650612" MODIFIED="1411013937752" TEXT="maTrixのworkflow"> +<node CREATED="1411013950556" ID="ID_1737126247" MODIFIED="1411013962650" TEXT="木構造に対するQuery"/> +</node> +<node CREATED="1411013978245" ID="ID_887101206" MODIFIED="1411014029530" TEXT="JungleのQueryの説明"/> +<node CREATED="1411014045375" ID="ID_439557141" MODIFIED="1411014064666" TEXT="JungleにおけるmaTrixのデモンストレーション"/> +<node CREATED="1411014119783" ID="ID_128617046" MODIFIED="1411014131298" TEXT="RDBと比べた場合の優位性"> +<node CREATED="1411014135006" ID="ID_127795770" MODIFIED="1411014174834" TEXT="RDBに組織の構造を構成するのは難しい"/> +<node CREATED="1411014195823" ID="ID_59087337" MODIFIED="1411014208882" TEXT="時間を中心に構成すると検索が複雑になる"/> +<node CREATED="1411014215143" ID="ID_1139224234" MODIFIED="1411014224338" TEXT="Jungleでは書き込みと検索は競合しない"/> +<node CREATED="1411014237039" ID="ID_419483256" MODIFIED="1411014253170" TEXT="RDBのようなテーブルロックは起きない"/> +<node CREATED="1411014286542" ID="ID_50210426" MODIFIED="1411014296306" TEXT="on memoryだから優位という訳ではない"/> +</node> +<node CREATED="1411014306039" ID="ID_1923969907" MODIFIED="1411014329194" TEXT="mongoDBに比べた場合の優位性"> +<node CREATED="1411014337567" ID="ID_391927576" MODIFIED="1411014347602" TEXT="mongoDBにも履歴はない"/> +<node CREATED="1411014365111" ID="ID_17360184" MODIFIED="1411014372274" TEXT="名前付きの木がない"/> +<node CREATED="1411014379263" ID="ID_707150710" MODIFIED="1411014391250" TEXT="transactionの扱い"/> +</node> +<node CREATED="1411014420327" ID="ID_1830265664" MODIFIED="1411014430138" TEXT="12月に向けての課題"> +<node CREATED="1411014434735" ID="ID_1576463639" MODIFIED="1411014452186" TEXT="indexの設計と実装"> +<node CREATED="1411014529958" ID="ID_703617744" MODIFIED="1411014534938" TEXT="10月"/> +</node> +<node CREATED="1411014454239" ID="ID_1355667962" MODIFIED="1411014456913" TEXT="性能評価"> +<node CREATED="1411014538671" ID="ID_1028819714" MODIFIED="1411014566345" TEXT="11月-12月"/> +</node> +<node CREATED="1411014463223" ID="ID_860646024" MODIFIED="1411014510706" TEXT="JungleDBの設計手法の確立"> +<node CREATED="1411014596503" ID="ID_1590313143" MODIFIED="1411014604994" TEXT="10月-12月"/> +</node> +<node CREATED="1411014511399" ID="ID_252710553" MODIFIED="1411014518178" TEXT="過去の履歴の取り扱い"> +<node CREATED="1411014577109" ID="ID_1867816274" MODIFIED="1411014584746" TEXT="12月以降"/> +</node> +</node> +</node> +</node> +</node> +</map>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/XACML.mm Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,43 @@ +<map version="1.0.1"> +<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net --> +<node CREATED="1409731863117" ID="ID_140617884" MODIFIED="1409731882853" TEXT="XACML"> +<node CREATED="1409731885402" ID="ID_791948050" MODIFIED="1409732124100" POSITION="right" TEXT="誰がどのリソースにどんなアクションを取るかを管理するもの"> +<node CREATED="1409732124101" ID="ID_1163560261" MODIFIED="1409732142087" TEXT="それに関係ない全体のルール→Condition"/> +<node CREATED="1409732163267" HGAP="25" ID="ID_732627068" MODIFIED="1409732310218" TEXT="全体のルール→Rule" VSHIFT="29"> +<node CREATED="1409731984667" ID="ID_178584665" MODIFIED="1409732029903" TEXT="誰が→Target"/> +<node CREATED="1409732065891" ID="ID_1725114395" MODIFIED="1409732086189" TEXT="どの→Resource"/> +<node CREATED="1409732091810" ID="ID_1333781502" MODIFIED="1409732108205" TEXT="どのような行動→Action"/> +<node CREATED="1409732271539" ID="ID_694350459" MODIFIED="1409732290189" TEXT="複数のRuleをまとめたもの→Policy"> +<node CREATED="1409732926724" ID="ID_1962523349" MODIFIED="1409732978671" TEXT="ポリシーはポリシー識別子で参照する"/> +</node> +<node CREATED="1409732311338" ID="ID_1984990717" MODIFIED="1409732341830" TEXT="複数ルールがある場合特定のアルゴリズムに乗っ取って統合する"> +<node CREATED="1409732354595" HGAP="19" ID="ID_1685519805" MODIFIED="1409732599784" TEXT="どれか1つでもDenyを出したらDenyにするDeny-overrides" VSHIFT="-19"/> +<node CREATED="1409732385067" HGAP="26" ID="ID_1098618443" MODIFIED="1409732602639" TEXT="どれか1つでもPermitがあればPermitにするPermit-overrides" VSHIFT="8"/> +<node CREATED="1409732449668" HGAP="32" ID="ID_138146825" MODIFIED="1409732604863" TEXT="ポリシー内のすべてのルールについて順番に評価して対象がマッチした場合処理を中断し次にconditionを評価するFirst-applicable" VSHIFT="29"/> +</node> +</node> +<node CREATED="1409732719180" ID="ID_331065212" MODIFIED="1409732722847" TEXT="問題点"> +<node CREATED="1409732723564" ID="ID_510301850" MODIFIED="1409732746455" TEXT="承認か不承認かぐらいしか出来ない"> +<node CREATED="1409733143596" ID="ID_1046118655" MODIFIED="1409733163935" TEXT="〜課長に問い合わせ等の返答が出来ない"/> +</node> +</node> +<node CREATED="1409732851356" ID="ID_579396423" MODIFIED="1409732856527" TEXT="セキュリティー"> +<node CREATED="1409732857036" ID="ID_1615204542" MODIFIED="1409732888623" TEXT="アクセスはTLSかVPNで"> +<node CREATED="1409732889140" ID="ID_563214936" MODIFIED="1409732903294" TEXT="並列信頼研ではここに関しては何もしない"/> +</node> +</node> +</node> +<node CREATED="1409731961971" ID="ID_467825694" MODIFIED="1409731980190" POSITION="left" TEXT="コンパイラを書くのは大変なのでとりあえずは自分でコンパイル後のコードを使う"> +<node CREATED="1409732638820" ID="ID_339904056" MODIFIED="1409732663735" TEXT="XACMLを見ながら手でJavaを書く"/> +<node CREATED="1409732667236" ID="ID_981072967" MODIFIED="1409732694959" TEXT="製品化する際はがんばってコンパイラを書く"/> +<node CREATED="1409732785548" ID="ID_386637317" MODIFIED="1409732791518" TEXT="インタプリタは遅くなるからだめ"/> +</node> +<node CREATED="1409733014548" HGAP="5" ID="ID_1050648292" MODIFIED="1409733027233" POSITION="right" TEXT="Jungleとの対応" VSHIFT="64"> +<node CREATED="1409733028876" ID="ID_1608071345" MODIFIED="1409733111442" TEXT="Jungleは大きなデータを持たない"> +<node CREATED="1409733042236" ID="ID_1251734070" MODIFIED="1409733050822" TEXT="今の段階ではStringのみ"/> +<node CREATED="1409733053637" ID="ID_339756775" MODIFIED="1409733068838" TEXT="大きなデータはURLで参照させる"/> +<node CREATED="1409733112652" ID="ID_1078433625" MODIFIED="1409733112652" TEXT=""/> +</node> +</node> +</node> +</map>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/basic_api_architecture.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,1131 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-07 10:37:40 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1 0/72 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Bounds</key> + <string>{{279.5, 250.5}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>104</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{255.5, 370}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>102</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{441, 491.25}, {71, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>103</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<extends>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{23.5, 10}, {57, 32}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>55</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;\f1\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 \'8a\'ee\'96\'7b +\f1 API\ +Read Only}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>Head</key> + <dict> + <key>ID</key> + <integer>34</integer> + </dict> + <key>ID</key> + <integer>52</integer> + <key>Points</key> + <array> + <string>{268.99999385152552, 228.5}</string> + <string>{268.99999385152552, 286.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>51</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{181, 174}, {176, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>50</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Tree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{181, 210}, {176, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>51</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Node getRoot()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>50</integer> + <integer>51</integer> + <array/> + </array> + <key>ID</key> + <integer>49</integer> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>Head</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + <key>ID</key> + <integer>47</integer> + <key>Points</key> + <array> + <string>{396.4405562316386, 410.26124406682794}</string> + <string>{302.55881283802307, 359.23875942269564}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>Head</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + <key>ID</key> + <integer>46</integer> + <key>Points</key> + <array> + <string>{146.71805539866665, 410.25360103626548}</string> + <string>{236.78255255712509, 359.24640251709661}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>37</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>Head</key> + <dict> + <key>ID</key> + <integer>42</integer> + </dict> + <key>ID</key> + <integer>54</integer> + <key>Points</key> + <array> + <string>{430.03104574657306, 464.99999733370157}</string> + <string>{430.25, 531.99999100000002}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>53</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{460.25, 538}, {83, 28}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>43</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<interface>>\ +Iterable<Node>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{412, 532}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>42</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{337.5, 410.5}, {185, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>40</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Children}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{337.5, 446.5}, {185, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>53</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Iterator<Node> iterator()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>40</integer> + <integer>53</integer> + <array/> + </array> + <key>ID</key> + <integer>39</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{22, 410.5}, {185, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>37</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Attributes}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{22, 446.5}, {185, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>38</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ ByteBuffer get(String key)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>37</integer> + <integer>38</integer> + <array/> + </array> + <key>ID</key> + <integer>36</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{181, 287}, {176, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>34</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Node}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{181, 323}, {176, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>35</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Attributes getAttribute()\ ++ Children getChildren()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>34</integer> + <integer>35</integer> + <array/> + </array> + <key>ID</key> + <integer>33</integer> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-10 11:32:24 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-1477, 368}, {892, 1006}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{-99, -42}, {757, 867}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/basic_api_architecture.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="11 1 542 578" width="542pt" height="578pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-10 11:32Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker_2" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><rect x="181" y="323" width="176" height="36" fill="white"/><rect x="181" y="323" width="176" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(186 323)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="157.008">+ Attributes getAttribute()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="142.86">+ Children getChildren()</tspan></text><rect x="181" y="287" width="176" height="36" fill="white"/><rect x="181" y="287" width="176" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(186 287)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="43.712" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="65.99" y="29" textLength="34.02">Node</tspan></text><rect x="22" y="446.5" width="185" height="18" fill="white"/><rect x="22" y="446.5" width="185" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(27 446.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="63.624">+ ByteBuff</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="63.624" y="11" textLength="104.664">er get(String key)</tspan></text><rect x="22" y="410.5" width="185" height="36" fill="white"/><rect x="22" y="410.5" width="185" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(27 410.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="48.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="54.608" y="29" textLength="65.783997">Attributes</tspan></text><rect x="337.5" y="446.5" width="185" height="18" fill="white"/><rect x="337.5" y="446.5" width="185" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(342.5 446.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="156.504">+ Iterator<Node> iterator()</tspan></text><rect x="337.5" y="410.5" width="185" height="36" fill="white"/><rect x="337.5" y="410.5" width="185" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(342.5 410.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="48.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="60.398" y="29" textLength="54.204">Children</tspan></text><ellipse cx="430.25" cy="550" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="430.25" cy="550" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(460.25 538)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x="4.4716797" y="11" textLength="74.05664"><<interface>></tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".13574219" y="25" textLength="82.728516">Iterable<Node></tspan></text><line x1="430.03105" y1="465" x2="430.21727" y2="521.98576" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="155.33235" y1="405.37489" x2="236.7821" y2="359.2464" marker-start="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="387.7423" y1="405.53386" x2="302.55928" y2="359.23876" marker-start="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><rect x="181" y="210" width="176" height="18" fill="white"/><rect x="181" y="210" width="176" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(186 210)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="103.872">+ Node getRoot()</tspan></text><rect x="181" y="174" width="176" height="36" fill="white"/><rect x="181" y="174" width="176" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(186 174)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="43.712" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="68.69" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="76.118" y="29" textLength="21.192">ree</tspan></text><line x1="269" y1="228.5" x2="269" y2="276.48571" marker-end="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(23.5 10)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="5.4902344" y="11" textLength="24">基本</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="29.490234" y="11" textLength="3.3339844"> </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="32.167969" y="11" textLength="19.341797">API</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".15234375" y="29" textLength="56.695312">Read Only</tspan></text><text transform="translate(441 491.25)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".46972656" y="11" textLength="70.060547"><<extends>></tspan></text><text transform="translate(255.5 370)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text><text transform="translate(279.5 250.5)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/jungle_artitecture.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,644 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-10 15:06:13 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1.0000 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Bounds</key> + <string>{{290, 243.5}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>49</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>41</integer> + </dict> + <key>ID</key> + <integer>48</integer> + <key>Points</key> + <array> + <string>{275.5, 429.99999100000002}</string> + <string>{275.5, 355.49999999086265}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>44</integer> + <key>Info</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{239, 483}, {73, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>43</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +TraversableTree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{257.25, 430}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>44</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>40</integer> + </dict> + <key>ID</key> + <integer>42</integer> + <key>Points</key> + <array> + <string>{275.50001356530873, 218.5}</string> + <string>{275.50003223584122, 282.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{148, 283}, {255, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>40</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 JungleTree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{148, 301}, {255, 54}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>41</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;\f1\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ MergeResult push(JungleDB remote)\ ++ MergeResult pull(JungleDB remote) +\f1 \kerning1\expnd0\expndtw0 \ + +\f0 \expnd0\expndtw0\kerning0 ++ TreeEditor getEditor()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>40</integer> + <integer>41</integer> + <array/> + </array> + <key>ID</key> + <integer>39</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{91.75, 103}, {367.5, 23}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>14</real> + </dict> + <key>ID</key> + <integer>34</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs30 \cf0 JungleDB}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{91.75, 126}, {367.5, 92}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>14</real> + </dict> + <key>ID</key> + <integer>35</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs30 \cf0 \expnd0\expndtw0\kerning0 ++ Iterable<JungleTree> getTrees()\ ++ JungleTree getTreeByName(String name)\ ++ JungleTree createNewTree(String name)\ ++ void deleteTree(String name)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>34</integer> + <integer>35</integer> + <array/> + </array> + <key>ID</key> + <integer>33</integer> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-11 08:21:25 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-1683, 185}, {693, 922}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{0, 0}, {558, 783}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/jungle_artitecture.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="80 92 391 424" width="391pt" height="424pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-11 08:21Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Hiragino Kaku Gothic ProN" font-size="15" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-59.999996" underline-thickness="62.999996" slope="0" x-height="545" cap-height="766" ascent="880.00177" descent="-120.00024" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="15" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-59.999996" underline-thickness="116.99999" slope="0" x-height="562" cap-height="784" ascent="880.00177" descent="-120.00024" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Helvetica" font-size="10" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><rect x="91.75" y="126" width="367.5" height="92" fill="white"/><rect x="91.75" y="126" width="367.5" height="92" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(96.75 126)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="15" font-weight="400" x="0" y="13" textLength="249.465">+ Iterable<JungleTree> getTrees()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="15" font-weight="400" x="0" y="36" textLength="323.055">+ JungleTree getTreeByName(String name)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="15" font-weight="400" x="0" y="59" textLength="315.975">+ JungleTree createNewTree(String name)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="15" font-weight="400" x="0" y="82" textLength="231.135">+ void deleteTree(String name)</tspan></text><rect x="91.75" y="103" width="367.5" height="23" fill="white"/><rect x="91.75" y="103" width="367.5" height="23" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(96.75 103)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="15" font-weight="bold" x="140.5225" y="13" textLength="76.455">JungleDB</tspan></text><rect x="148" y="301" width="255" height="54" fill="white"/><rect x="148" y="301" width="255" height="54" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(153 301)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="231.6">+ MergeResult push(JungleDB remote)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="223.32001">+ MergeResult pull(JungleDB remote)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="47" textLength="142.296005">+ TreeEditor getEditor()</tspan></text><rect x="148" y="283" width="255" height="18" fill="white"/><rect x="148" y="283" width="255" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(153 283)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="86.968" y="11" textLength="50.952">JungleT</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="136.84" y="11" textLength="21.192">ree</tspan></text><line x1="275.50001" y1="218.5" x2="275.50001" y2="272.48571" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><ellipse cx="275.5" cy="448" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="275.5" cy="448" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(239 483)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="5.6430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".18652344" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="5.928711" y="22" textLength="52.79785">raversableT</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="58.36035" y="22" textLength="14.453125">ree</tspan></text><line x1="275.5" y1="420.1" x2="275.5" y2="355.5" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(290 243.5)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/node_transform_architecture.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,1621 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-10 15:16:19 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1 0/72 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>101</integer> + </dict> + <key>ID</key> + <integer>128</integer> + <key>Points</key> + <array> + <string>{80.750009124999949, 468}</string> + <string>{151.50000632809025, 467.6440251549617}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>126</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{31.5, 418}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>127</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Node}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{44.25, 450}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>126</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{252.5, 513}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>125</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{215, 346}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>124</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{386.25, 277}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>123</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{289, 166}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>122</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>118</integer> + </dict> + <key>ID</key> + <integer>120</integer> + <key>Points</key> + <array> + <string>{319.5296010388048, 272.20701208539185}</string> + <string>{394.47039896119531, 306.29298791460815}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>98</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{338, 306.5}, {193, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>118</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<enum>>\ +TransformResult}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{338, 342.5}, {193, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>119</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TransformResult SUCCESS\ ++ TransformResult FAIL}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>118</integer> + <integer>119</integer> + <array/> + </array> + <key>ID</key> + <integer>117</integer> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>108</integer> + </dict> + <key>ID</key> + <integer>116</integer> + <key>Points</key> + <array> + <string>{413.25, 705.99999100000002}</string> + <string>{413.44803370822137, 635.49999800241471}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>113</integer> + <key>Info</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>105</integer> + </dict> + <key>ID</key> + <integer>115</integer> + <key>Points</key> + <array> + <string>{139.25, 711.99999100000002}</string> + <string>{139.45131578944796, 635.49999825715258}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>42</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{446.75, 712}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>114</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Children}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{395, 706}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>113</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{172.75, 718}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>43</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Attributes}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{121, 712}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>42</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>100</integer> + </dict> + <key>ID</key> + <integer>112</integer> + <key>Points</key> + <array> + <string>{279.50001186443728, 272.5}</string> + <string>{279.50001186443728, 412.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>98</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>97</integer> + </dict> + <key>ID</key> + <integer>111</integer> + <key>Points</key> + <array> + <string>{279.50000826457716, 143.5}</string> + <string>{279.50000826457716, 199.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>107</integer> + </dict> + <key>ID</key> + <integer>110</integer> + <key>Points</key> + <array> + <string>{301.03872412585957, 485.32398918170145}</string> + <string>{391.96127587414048, 562.67601081829866}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>101</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>104</integer> + </dict> + <key>ID</key> + <integer>109</integer> + <key>Points</key> + <array> + <string>{257.00701890738134, 485.31571317541813}</string> + <string>{161.99298109261875, 562.68428682458193}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>101</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{284, 563}, {259, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>107</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +EditableChildren}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{284, 599}, {259, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>108</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ EditableNode newChildAt(int pos)\ ++ EditableNode deleteChildAt(int pos)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>107</integer> + <integer>108</integer> + <array/> + </array> + <key>ID</key> + <integer>106</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{10, 563}, {259, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>104</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +EditableAttributes}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{10, 599}, {259, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>105</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ EditableNode put(String k,ByteBuffer v)\ ++ EditableNode delete(String k)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>104</integer> + <integer>105</integer> + <array/> + </array> + <key>ID</key> + <integer>103</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{61, 513}, {72, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>102</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 \'8f\'7a\'8a\'c2\'8e\'51\'8f\'c6\'82\'a0\'82\'e8}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{152, 413}, {255, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>100</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +EditableNode}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{152, 449}, {255, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>101</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ EditableAttributes getAttributes()\ ++ EditableChildren getChildren()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>100</integer> + <integer>101</integer> + <array/> + </array> + <key>ID</key> + <integer>99</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{171, 200}, {217, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>97</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Transformation}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{171, 236}, {217, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>98</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ EditableNode getEditableNode()\ ++ TransformResult getResult()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>97</integer> + <integer>98</integer> + <array/> + </array> + <key>ID</key> + <integer>96</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{121, 89}, {317, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>34</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +NodeTransformer}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{121, 125}, {317, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>35</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Transformation transform(EditableNode target)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>34</integer> + <integer>35</integer> + <array/> + </array> + <key>ID</key> + <integer>33</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{10, 11}, {105, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>95</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 NodeTransform API}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-10 15:30:23 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-1702, 314}, {693, 922}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{0, 0}, {558, 783}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/node_transform_architecture.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="-10 2 573 757" width="573pt" height="757pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-10 15:30Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker_2" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Helvetica" font-size="10" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><text transform="translate(10 11)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".029296875" y="11" textLength="36.017578">NodeT</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="35.607422" y="11" textLength="50.677734">ransform </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="85.628906" y="11" textLength="19.341797">API</tspan></text><rect x="121" y="125" width="317" height="18" fill="white"/><rect x="121" y="125" width="317" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(126 125)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="295.116">+ Transformation transform(EditableNode target)</tspan></text><rect x="121" y="89" width="317" height="36" fill="white"/><rect x="121" y="89" width="317" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(126 89)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="111.26" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="95.756" y="29" textLength="42.528">NodeT</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="137.204" y="29" textLength="74.04">ransformer</tspan></text><rect x="171" y="236" width="217" height="36" fill="white"/><rect x="171" y="236" width="217" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(176 236)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="202.092">+ EditableNode getEditableNode()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="180.636">+ TransformResult getResult()</tspan></text><rect x="171" y="200" width="217" height="36" fill="white"/><rect x="171" y="200" width="217" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(176 200)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="64.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="53.448" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="60.876" y="29" textLength="92.676">ransformation</tspan></text><rect x="152" y="449" width="255" height="36" fill="white"/><rect x="152" y="449" width="255" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(157 449)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="210.972">+ EditableAttributes getAttributes()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="190.38">+ EditableChildren getChildren()</tspan></text><rect x="152" y="413" width="255" height="36" fill="white"/><rect x="152" y="413" width="255" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(157 413)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="83.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="79.42" y="29" textLength="86.160004">EditableNode</tspan></text><text transform="translate(61 513)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="72">循環参照あり</tspan></text><rect x="10" y="599" width="259" height="36" fill="white"/><rect x="10" y="599" width="259" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(15 599)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="220.524">+ EditableNode put(String k,ByteBuff</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="220.524" y="11" textLength="27.011999">er v)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="186.68401">+ EditableNode delete(String k)</tspan></text><rect x="10" y="563" width="259" height="36" fill="white"/><rect x="10" y="563" width="259" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(15 563)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="85.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="65.538" y="29" textLength="117.924004">EditableAttributes</tspan></text><rect x="284" y="599" width="259" height="36" fill="white"/><rect x="284" y="599" width="259" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(289 599)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="211.48801">+ EditableNode newChildAt(int pos)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="224.184">+ EditableNode deleteChildAt(int pos)</tspan></text><rect x="284" y="563" width="259" height="36" fill="white"/><rect x="284" y="563" width="259" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(289 563)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="85.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="71.328" y="29" textLength="106.344">EditableChildren</tspan></text><line x1="249.3302" y1="491.56683" x2="169.75842" y2="556.361" marker-end="url(#Arrow_Marker)" marker-start="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="308.57915" y1="491.73897" x2="384.3338" y2="556.18697" marker-end="url(#Arrow_Marker)" marker-start="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="279.5" y1="143.5" x2="279.5" y2="189.48571" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="279.50001" y1="272.5" x2="279.50001" y2="402.4857" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><ellipse cx="139.25" cy="730" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="139.25" cy="730" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(172.75 718)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="9.8793945" y="22" textLength="42.24121">Attributes</tspan></text><ellipse cx="413.25" cy="724" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="413.25" cy="724" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(446.75 712)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="12.3793945" y="22" textLength="37.24121">Children</tspan></text><line x1="139.27605" y1="702.10003" x2="139.451316" y2="635.5" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="413.2778" y1="696.10003" x2="413.44803" y2="635.5" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="338" y="342.5" width="193" height="36" fill="white"/><rect x="338" y="342.5" width="193" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(343 342.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="174.744">+ TransformResult SUCCESS</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="141.96001">+ TransformResult FAIL</tspan></text><rect x="338" y="306.5" width="193" height="36" fill="white"/><rect x="338" y="306.5" width="193" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(343 306.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="60.582" y="11" textLength="61.836"><<enum>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="37.254" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="44.682" y="29" textLength="101.064">ransformResult</tspan></text><line x1="319.5296" y1="272.20701" x2="385.35474" y2="302.14683" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(289 166)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><text transform="translate(386.25 277)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><text transform="translate(215 346)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><text transform="translate(252.5 513)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><ellipse cx="62.5" cy="468" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="62.5" cy="468" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(31.5 418)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="19.046875" y="22" textLength="23.90625">Node</tspan></text><line x1="90.649883" y1="467.9502" x2="151.50001" y2="467.64403" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/traverser_api_architecture.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,1999 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-10 11:11:43 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1 0/72 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Bounds</key> + <string>{{284.75, 136.25000000000006}, {71, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>104</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<extends>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{382.75, 639}, {71, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>103</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<extends>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{284.75, 560.125}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>102</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{284.75, 442.25}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>101</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>67</integer> + </dict> + <key>ID</key> + <integer>100</integer> + <key>Points</key> + <array> + <string>{273.01271064717207, 530.68742818315377}</string> + <string>{273.98728935282793, 588.18757181684623}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>65</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>64</integer> + </dict> + <key>ID</key> + <integer>99</integer> + <key>Points</key> + <array> + <string>{272.75001471756116, 427.59375}</string> + <string>{272.75001471756116, 469.6875}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>62</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{210.75, 230.5}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>98</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{280.25, 358.09375}, {48, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>97</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<use>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>61</integer> + </dict> + <key>ID</key> + <integer>96</integer> + <key>Points</key> + <array> + <string>{274.0376134121887, 339.4998750839743}</string> + <string>{273.09652724919926, 381.5938749160257}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{9, 16}, {73, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>95</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Traverser API}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>42</integer> + </dict> + <key>ID</key> + <integer>94</integer> + <key>Points</key> + <array> + <string>{274.41847796176307, 164.50002953953299}</string> + <string>{275, 111.00000899999995}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>89</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{305, 81}, {69, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>43</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Iterable<Node>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{256.75, 75}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>42</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>58</integer> + </dict> + <key>ID</key> + <integer>91</integer> + <key>Points</key> + <array> + <string>{274.25000858890604, 225.5}</string> + <string>{274.25000858890604, 284.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>90</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{126.25, 165}, {296, 30}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>89</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 <<inteface>>\ +TraverseResult}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{126.25, 195}, {296, 30}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>90</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ Iterator<Node> itrerator()\ ++ Node target()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>89</integer> + <integer>90</integer> + <array/> + </array> + <key>ID</key> + <integer>88</integer> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>70</integer> + </dict> + <key>ID</key> + <integer>84</integer> + <key>Points</key> + <array> + <string>{302.80471084639845, 633.81655985169823}</string> + <string>{467.69528915360155, 677.87094014830177}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>68</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>73</integer> + </dict> + <key>ID</key> + <integer>83</integer> + <key>Points</key> + <array> + <string>{284.65534452587542, 633.98739885865393}</string> + <string>{342.96965547412458, 677.70010114134607}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>68</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>76</integer> + </dict> + <key>ID</key> + <integer>82</integer> + <key>Points</key> + <array> + <string>{265.8228188208621, 634.02808327353125}</string> + <string>{218.92718117913796, 677.65941672646875}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>68</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>79</integer> + </dict> + <key>ID</key> + <integer>81</integer> + <key>Points</key> + <array> + <string>{247.02463170015864, 633.822510199926}</string> + <string>{89.975368299841378, 677.864989800074}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>68</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{0.75, 678}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>79</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 ACCEPT_CONTINUE}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{0.75, 693}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>80</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ ???}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>79</integer> + <integer>80</integer> + <array/> + </array> + <key>ID</key> + <integer>78</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{148.5, 678}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>76</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 ACCEPT_BREAK}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{148.5, 693}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>77</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ ???}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>76</integer> + <integer>77</integer> + <array/> + </array> + <key>ID</key> + <integer>75</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{291.375, 678}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>73</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 DENY_CONTINUE}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{291.375, 693}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>74</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ ???}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>73</integer> + <integer>74</integer> + <array/> + </array> + <key>ID</key> + <integer>72</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{434.25, 678}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>70</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 DENY_BREAK}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{434.25, 693}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>71</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ ???}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>70</integer> + <integer>71</integer> + <array/> + </array> + <key>ID</key> + <integer>69</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{212.25, 588.6875}, {124, 30}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>67</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 <<enum>>\ +EvaluationResult}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{212.25, 618.6875}, {124, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>68</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ ???}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>67</integer> + <integer>68</integer> + <array/> + </array> + <key>ID</key> + <integer>66</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{182.75, 470.1875}, {180, 30}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>64</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 <<inteface>>\ +Evaluation}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{182.75, 500.1875}, {180, 30}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>65</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ EvaluationResult result()\ ++ TraverseEvaluator evaluator()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>64</integer> + <integer>65</integer> + <array/> + </array> + <key>ID</key> + <integer>63</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{124.75, 382.09375}, {296, 30}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>61</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs20 \cf0 <<inteface>>\ +TraverseEvaluator}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{124.75, 412.09375}, {296, 15}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>62</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs20 \cf0 \expnd0\expndtw0\kerning0 ++ Evaluation eval(Iterable<Node> path,Node child,int pos)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>61</integer> + <integer>62</integer> + <array/> + </array> + <key>ID</key> + <integer>60</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{84.5, 285}, {379.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>58</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Traversable}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{84.5, 321}, {379.5, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>13</real> + </dict> + <key>ID</key> + <integer>59</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Iterable<TraverseResult> traverse(TraverseEvaluator e)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>58</integer> + <integer>59</integer> + <array/> + </array> + <key>ID</key> + <integer>57</integer> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-10 13:35:08 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-1302, 501}, {706, 939}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{-6, -8}, {571, 800}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/traverser_api_architecture.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="-11 7 581 712" width="581pt" height="712pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-10 13:35Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="10" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63" slope="0" x-height="545" cap-height="766" ascent="880.00177" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="10" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00177" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Helvetica" font-size="10" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker_2" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><rect x="84.5" y="321" width="379.5" height="18" fill="white"/><rect x="84.5" y="321" width="379.5" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(89.5 321)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="338.064">+ Iterable<TraverseResult> traverse(TraverseEvaluator e)</tspan></text><rect x="84.5" y="285" width="379.5" height="36" fill="white"/><rect x="84.5" y="285" width="379.5" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(89.5 285)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="145.462" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="146.734" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="154.162" y="29" textLength="68.603996">raversable</tspan></text><rect x="124.75" y="412.09375" width="296" height="15" fill="white"/><rect x="124.75" y="412.09375" width="296" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(129.75 412.09375)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="281.01001">+ Evaluation eval(Iterable<Node> path,Node child,int pos)</tspan></text><rect x="124.75" y="382.09375" width="296" height="30" fill="white"/><rect x="124.75" y="382.09375" width="296" height="30" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(129.75 382.09375)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="110.26" y="9" textLength="65.480003"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="93.805" y="24" textLength="7.09">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="99.995" y="24" textLength="92.199997">raverseEvaluator</tspan></text><rect x="182.75" y="500.1875" width="180" height="30" fill="white"/><rect x="182.75" y="500.1875" width="180" height="30" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(187.75 500.1875)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="129.84">+ EvaluationResult result()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="24" textLength="155.880005">+ TraverseEvaluator evaluator()</tspan></text><rect x="182.75" y="470.1875" width="180" height="30" fill="white"/><rect x="182.75" y="470.1875" width="180" height="30" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(187.75 470.1875)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="52.26" y="9" textLength="65.480003"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="57.17" y="24" textLength="55.66">Evaluation</tspan></text><rect x="212.25" y="618.6875" width="124" height="15" fill="white"/><rect x="212.25" y="618.6875" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(217.25 618.6875)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="27.02">+ ???</tspan></text><rect x="212.25" y="588.6875" width="124" height="30" fill="white"/><rect x="212.25" y="588.6875" width="124" height="30" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(217.25 588.6875)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="31.235" y="9" textLength="51.53"><<enum>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="12.265" y="24" textLength="89.47">EvaluationResult</tspan></text><rect x="434.25" y="693" width="124" height="15" fill="white"/><rect x="434.25" y="693" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(439.25 693)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="27.02">+ ???</tspan></text><rect x="434.25" y="678" width="124" height="15" fill="white"/><rect x="434.25" y="678" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(439.25 678)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="20.13" y="9" textLength="73.74">DENY_BREAK</tspan></text><rect x="291.375" y="693" width="124" height="15" fill="white"/><rect x="291.375" y="693" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(296.375 693)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="27.02">+ ???</tspan></text><rect x="291.375" y="678" width="124" height="15" fill="white"/><rect x="291.375" y="678" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(296.375 678)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="10.185" y="9" textLength="93.63">DENY_CONTINUE</tspan></text><rect x="148.5" y="693" width="124" height="15" fill="white"/><rect x="148.5" y="693" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(153.5 693)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="27.02">+ ???</tspan></text><rect x="148.5" y="678" width="124" height="15" fill="white"/><rect x="148.5" y="678" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(153.5 678)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="12.985" y="9" textLength="88.03">ACCEPT_BREAK</tspan></text><rect x=".75" y="693" width="124" height="15" fill="white"/><rect x=".75" y="693" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(5.75 693)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="27.02">+ ???</tspan></text><rect x=".75" y="678" width="124" height="15" fill="white"/><rect x=".75" y="678" width="124" height="15" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(5.75 678)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="3.04" y="9" textLength="107.92">ACCEPT_CONTINUE</tspan></text><line x1="237.49237" y1="636.4957" x2="89.97537" y2="677.865" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="258.57475" y1="640.77163" x2="218.92718" y2="677.6594" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="292.57685" y1="639.9254" x2="342.96966" y2="677.7001" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="312.36923" y1="636.37194" x2="467.6953" y2="677.87094" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="126.25" y="195" width="296" height="30" fill="white"/><rect x="126.25" y="195" width="296" height="30" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(131.25 195)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="9" textLength="134.72">+ Iterator<Node> itrerator()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="400" x="0" y="24" textLength="76.85">+ Node target()</tspan></text><rect x="126.25" y="165" width="296" height="30" fill="white"/><rect x="126.25" y="165" width="296" height="30" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(131.25 165)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="110.26" y="9" textLength="65.480003"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="102.47" y="24" textLength="7.09">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="10" font-weight="bold" x="108.66" y="24" textLength="74.870003">raverseResult</tspan></text><line x1="274.25001" y1="235.4" x2="274.25001" y2="284.5" marker-start="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><ellipse cx="275" cy="93" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="275" cy="93" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(305 81)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="3.6430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".029785156" y="22" textLength="68.94043">Iterable<Node></tspan></text><line x1="274.41848" y1="164.50003" x2="274.89116" y2="121.013705" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(9 16)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".040039062" y="11" textLength="7.330078">T</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="6.930664" y="11" textLength="47.34375">raverser </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="53.618164" y="11" textLength="19.341797">API</tspan></text><line x1="274.03761" y1="339.49988" x2="273.32036" y2="371.58209" marker-end="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(280.25 358.09375)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text><text transform="translate(210.75 230.5)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text><line x1="272.75001" y1="427.59375" x2="272.75001" y2="459.6732" marker-end="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="273.01271" y1="530.68743" x2="273.81758" y2="578.17472" marker-end="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(284.75 442.25)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text><text transform="translate(284.75 560.125)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="47.378906"><<use>></tspan></text><text transform="translate(382.75 639)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".46972656" y="11" textLength="70.060547"><<extends>></tspan></text><text transform="translate(284.75 136.25)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".46972656" y="11" textLength="70.060547"><<extends>></tspan></text></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/tree_store_api_b.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,1389 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-10 11:52:27 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1.0000 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>61</integer> + </dict> + <key>ID</key> + <integer>72</integer> + <key>Points</key> + <array> + <string>{329.20990925272872, 492.33892342450167}</string> + <string>{371.85932151650201, 531.66107657549833}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>58</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>58</integer> + </dict> + <key>ID</key> + <integer>71</integer> + <key>Points</key> + <array> + <string>{150.88502781235991, 531.62735921205035}</string> + <string>{186.00340193970618, 492.37264078794965}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>34</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>57</integer> + </dict> + <key>ID</key> + <integer>70</integer> + <key>Points</key> + <array> + <string>{214.7861962173489, 170.20408980090042}</string> + <string>{27.375, 254}</string> + <string>{197.37204229916, 311.83894891879646}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>57</integer> + </dict> + <key>ID</key> + <integer>69</integer> + <key>Points</key> + <array> + <string>{250.7499948051904, 278.5}</string> + <string>{250.7499948051904, 311.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>55</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{43.875, 656}, {82, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>68</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +TraverseEvaluator}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{164.125, 656}, {77, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>67</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Iterable<Integer>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + <key>ID</key> + <integer>66</integer> + <key>Points</key> + <array> + <string>{201.875, 613.99999100000002}</string> + <string>{166.1289581205294, 586.30622081488389}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>64</integer> + <key>Info</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + <key>ID</key> + <integer>65</integer> + <key>Points</key> + <array> + <string>{87.135666842446952, 613.68177223831776}</string> + <string>{120.29906669391403, 586.31821677435846}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>63</integer> + <key>Info</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{183.625, 614}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>64</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{68.5, 614}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>63</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{311.25, 532}, {161, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>61</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Result}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{311.25, 568}, {161, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>62</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TreeEditor getEditor()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>61</integer> + <integer>62</integer> + <array/> + </array> + <key>ID</key> + <integer>60</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{25.5, 532}, {234, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>34</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 NodePath}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{25.5, 550}, {234, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>59</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Evaluation eval(Iterable<Node> path,Node child,int pos)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>34</integer> + <integer>59</integer> + <array/> + </array> + <key>ID</key> + <integer>33</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{68.25, 312}, {365, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>57</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +TreeEditor}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{68.25, 348}, {365, 144}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>58</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TraversableTree getTree()\ ++ Result appendChildBehindOf(NodePath p)\ ++ Result appendChildInfrontOf(NodePath p)\ ++ Result deleteChild(NodePath p)\ ++ Result putAttribute(NodePath p,String k,ByteBuffer v)\ ++ Result deleteAttribute(NodePath p,String k)\ ++ boolean success()\ ++ void fail()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>57</integer> + <integer>58</integer> + <array/> + </array> + <key>ID</key> + <integer>56</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{153, 224}, {195.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>54</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +TreeStore}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{153, 260}, {195.5, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>55</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TreeEditor getCurrentTree()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>54</integer> + <integer>55</integer> + <array/> + </array> + <key>ID</key> + <integer>53</integer> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>50</integer> + </dict> + <key>ID</key> + <integer>52</integer> + <key>Points</key> + <array> + <string>{337.57701026311656, 64.266620666800307}</string> + <string>{284.48068520343776, 97.733389457544291}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>45</integer> + <key>Info</key> + <integer>1</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>50</integer> + </dict> + <key>ID</key> + <integer>51</integer> + <key>Points</key> + <array> + <string>{152, 64.000008999999949}</string> + <string>{219.22628960402827, 97.775530298288515}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>42</integer> + <key>Info</key> + <integer>1</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{77.5, 98}, {356, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>50</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +TraversableTree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{77.5, 134}, {356, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>35</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Node getRoot()\ ++ Iterable<TraverseResult> traverse(TraverseEvaluator e)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>50</integer> + <integer>35</integer> + <array/> + </array> + <key>ID</key> + <integer>49</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{371.5, 34}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>46</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Tree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{319.75, 28}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>45</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{185.5, 34}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>43</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Traversable}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{133.75, 28}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>42</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{10, 14}, {95, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>3</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 TreeStore API "B"}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-11 08:44:26 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-1461, 413}, {693, 922}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{0, 0}, {558, 783}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/tree_store_api_b.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="1 5 492 684" width="41pc" height="57pc"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-11 08:44Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><font-face font-family="Helvetica" font-size="10" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker_2" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><text transform="translate(10 14)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".103515625" y="11" textLength="7.330078">T</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="6.9941406" y="11" textLength="49.359375">reeStore </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="55.697266" y="11" textLength="39.199219">API "B"</tspan></text><ellipse cx="152" cy="46" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="152" cy="46" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(185.5 34)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="4.7841797" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="10.526367" y="22" textLength="46.689453">raversable</tspan></text><ellipse cx="338" cy="46" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="338" cy="46" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(371.5 34)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="20.902344" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="26.644531" y="22" textLength="14.453125">ree</tspan></text><rect x="77.5" y="134" width="356" height="36" fill="white"/><rect x="77.5" y="134" width="356" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(82.5 134)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="103.872">+ Node getRoot()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="338.064">+ Iterable<TraverseResult> traverse(TraverseEvaluator e)</tspan></text><rect x="77.5" y="98" width="356" height="36" fill="white"/><rect x="77.5" y="98" width="356" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(82.5 98)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="130.76" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="120.674" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="128.102" y="29" textLength="77.112">raversableT</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="204.134" y="29" textLength="21.192">ree</tspan></text><line x1="160.84627" y1="68.44451" x2="219.22629" y2="97.77553" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="329.20185" y1="69.54551" x2="284.48069" y2="97.73339" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="153" y="260" width="195.5" height="18" fill="white"/><rect x="153" y="260" width="195.5" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(158 260)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="179.65199">+ TreeEditor getCurrentTree()</tspan></text><rect x="153" y="224" width="195.5" height="36" fill="white"/><rect x="153" y="224" width="195.5" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(158 224)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="50.51" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="60.752" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="68.18" y="29" textLength="56.568">reeStore</tspan></text><rect x="68.25" y="348" width="365" height="144" fill="white"/><rect x="68.25" y="348" width="365" height="144" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(73.25 348)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="167.508">+ TraversableTree getTree()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="261.92401">+ Result appendChildBehindOf(NodePath p)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="47" textLength="261.08401">+ Result appendChildInfrontOf(NodePath p)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="65" textLength="198.108">+ Result deleteChild(NodePath p)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="83" textLength="305.064">+ Result putAttribute(NodePath p,String k,ByteBuff</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="305.064" y="83" textLength="27.011999">er v)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="101" textLength="271.224">+ Result deleteAttribute(NodePath p,String k)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="119" textLength="118.992">+ boolean success()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="137" textLength="66.587997">+ void fail()</tspan></text><rect x="68.25" y="312" width="365" height="36" fill="white"/><rect x="68.25" y="312" width="365" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(73.25 312)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="135.26" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="143.636" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="151.064" y="29" textLength="60.3">reeEditor</tspan></text><rect x="25.5" y="550" width="234" height="36" fill="white"/><rect x="25.5" y="550" width="234" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(30.5 550)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="196.40401">+ Evaluation eval(Iterable<Node> </tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="140.808">path,Node child,int pos)</tspan></text><rect x="25.5" y="532" width="234" height="18" fill="white"/><rect x="25.5" y="532" width="234" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(30.5 532)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="80.278" y="11" textLength="63.444">NodePath</tspan></text><rect x="311.25" y="568" width="161" height="18" fill="white"/><rect x="311.25" y="568" width="161" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(316.25 568)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="142.296005">+ TreeEditor getEditor()</tspan></text><rect x="311.25" y="532" width="161" height="36" fill="white"/><rect x="311.25" y="532" width="161" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(316.25 532)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="36.212" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="55.214" y="29" textLength="40.571999">Result</tspan></text><ellipse cx="86.75" cy="632" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="86.75" cy="632" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><ellipse cx="201.875" cy="632" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="201.875" cy="632" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="87.135667" y1="613.68177" x2="112.57478" y2="592.69165" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="201.875" y1="614" x2="174.04541" y2="592.4394" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(164.125 656)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="7.6430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".4165039" y="22" textLength="76.16699">Iterable<Integer></tspan></text><text transform="translate(43.875 656)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="10.1430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".3334961" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="6.0756836" y="22" textLength="75.59082">raverseEvaluator</tspan></text><line x1="250.75" y1="278.5" x2="250.75" y2="301.48571" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><path d="M 205.74847 174.24507 L 27.375 254 L 197.37204 311.83895" marker-start="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="157.48585" y1="524.24907" x2="186.0034" y2="492.37264" marker-start="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="329.2099" y1="492.33892" x2="364.49679" y2="524.87292" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/tree_store_api_type_a.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,1384 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-10 13:30:22 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1.0000 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>80</integer> + </dict> + <key>ID</key> + <integer>82</integer> + <key>Points</key> + <array> + <string>{304.34595495094356, 509.36099409918046}</string> + <string>{401.75, 610.99999100000002}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>58</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{363.5, 653}, {78, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>81</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +NodeTransformer}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{383.5, 611}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>80</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{53.375, 716.5}, {82, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>68</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +TraverseEvaluator}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{173.625, 716.5}, {77, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>67</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Iterable<Integer>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>58</integer> + </dict> + <key>ID</key> + <integer>71</integer> + <key>Points</key> + <array> + <string>{161.03305272955481, 585.39022296759765}</string> + <string>{234.4094828370566, 509.35977724764678}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>34</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>57</integer> + </dict> + <key>ID</key> + <integer>70</integer> + <key>Points</key> + <array> + <string>{235.80100933867519, 193.73798381002658}</string> + <string>{45, 297}</string> + <string>{235.93772800235965, 400.76125976074781}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>57</integer> + </dict> + <key>ID</key> + <integer>69</integer> + <key>Points</key> + <array> + <string>{269.49999174219897, 324.75}</string> + <string>{269.49999174219897, 400.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>55</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + <key>ID</key> + <integer>66</integer> + <key>Points</key> + <array> + <string>{206.625, 664.24999100000002}</string> + <string>{175.52992651577071, 640.0570327716415}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>64</integer> + <key>Info</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + <key>ID</key> + <integer>65</integer> + <key>Points</key> + <array> + <string>{94.528010424639959, 663.9540438825901}</string> + <string>{127.08522135341524, 640.0459458876345}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>63</integer> + <key>Info</key> + <integer>2</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{188.375, 664.25}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>64</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{75.875, 664.25}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>63</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{35, 585.75}, {234, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>34</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 NodePath}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{35, 603.75}, {234, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>59</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Evaluation eval(Iterable<Node> path,Node child,int pos)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>34</integer> + <integer>59</integer> + <array/> + </array> + <key>ID</key> + <integer>33</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{87, 401}, {365, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>57</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +TreeEditor}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{87, 437}, {365, 72}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>58</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TraversableTree getTree()\ ++ TreeEditor edit(NodePath p,NodeTransformer t)\ ++ boolean success()\ ++ void fail()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>57</integer> + <integer>58</integer> + <array/> + </array> + <key>ID</key> + <integer>56</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{171.75, 270.25}, {195.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>54</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +TreeStore}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{171.75, 306.25}, {195.5, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>55</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TreeEditor getCurrentTree()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>54</integer> + <integer>55</integer> + <array/> + </array> + <key>ID</key> + <integer>53</integer> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>50</integer> + </dict> + <key>ID</key> + <integer>52</integer> + <key>Points</key> + <array> + <string>{351.57701026311662, 87.766620666800279}</string> + <string>{298.48068520343776, 121.23338945754429}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>45</integer> + <key>Info</key> + <integer>1</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>50</integer> + </dict> + <key>ID</key> + <integer>51</integer> + <key>Points</key> + <array> + <string>{166, 87.500008999999949}</string> + <string>{233.22628960402827, 121.27553029828852}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>42</integer> + <key>Info</key> + <integer>1</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{91.5, 121.5}, {356, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>50</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<interface>>\ +TraversableTree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{91.5, 157.5}, {356, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>35</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Node getRoot()\ ++ Iterable<TraverseResult> traverse(TraverseEvaluator e)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>50</integer> + <integer>35</integer> + <array/> + </array> + <key>ID</key> + <integer>49</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{385.5, 57.5}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>46</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Tree}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{333.75, 51.5}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>45</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{199.5, 57.5}, {62, 24}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>43</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs20 \cf0 <<interface>>\ +Traversable}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{147.75, 51.5}, {36.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FontInfo</key> + <dict> + <key>Font</key> + <string>HiraKakuProN-W6</string> + <key>Size</key> + <real>11</real> + </dict> + <key>ID</key> + <integer>42</integer> + <key>Magnets</key> + <array> + <string>{0, 1}</string> + <string>{0, -1}</string> + <string>{1, 0}</string> + <string>{-1, 0}</string> + </array> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{15, 16}, {95, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>3</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 TreeStore API "A"}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-11 08:46:02 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-1364, 479}, {693, 922}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{0, 0}, {558, 783}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/tree_store_api_type_a.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="6 7 466 743" width="466pt" height="743pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-11 08:46Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><font-face font-family="Helvetica" font-size="10" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker_2" viewBox="-9 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M -8 0 L 0 3 L 0 -3 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><text transform="translate(15 16)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".103515625" y="11" textLength="7.330078">T</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="6.9941406" y="11" textLength="49.359375">reeStore </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="55.697266" y="11" textLength="39.199219">API "A"</tspan></text><ellipse cx="166" cy="69.5" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="166" cy="69.5" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(199.5 57.5)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="4.7841797" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="10.526367" y="22" textLength="46.689453">raversable</tspan></text><ellipse cx="352" cy="69.5" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="352" cy="69.5" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(385.5 57.5)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".14306641" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="20.902344" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="26.644531" y="22" textLength="14.453125">ree</tspan></text><rect x="91.5" y="157.5" width="356" height="36" fill="white"/><rect x="91.5" y="157.5" width="356" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(96.5 157.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="103.872">+ Node getRoot()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="338.064">+ Iterable<TraverseResult> traverse(TraverseEvaluator e)</tspan></text><rect x="91.5" y="121.5" width="356" height="36" fill="white"/><rect x="91.5" y="121.5" width="356" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(96.5 121.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="130.76" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="120.674" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="128.102" y="29" textLength="77.112">raversableT</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="204.134" y="29" textLength="21.192">ree</tspan></text><line x1="174.84627" y1="91.94451" x2="233.22629" y2="121.27553" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="343.20185" y1="93.04551" x2="298.48069" y2="121.23339" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="171.75" y="306.25" width="195.5" height="18" fill="white"/><rect x="171.75" y="306.25" width="195.5" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(176.75 306.25)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="179.65199">+ TreeEditor getCurrentTree()</tspan></text><rect x="171.75" y="270.25" width="195.5" height="36" fill="white"/><rect x="171.75" y="270.25" width="195.5" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(176.75 270.25)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="50.51" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="60.752" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="68.18" y="29" textLength="56.568">reeStore</tspan></text><rect x="87" y="437" width="365" height="72" fill="white"/><rect x="87" y="437" width="365" height="72" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(92 437)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="167.508">+ TraversableTree getTree()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="297.768">+ TreeEditor edit(NodePath p,NodeTransformer t)</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="47" textLength="118.992">+ boolean success()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="65" textLength="66.587997">+ void fail()</tspan></text><rect x="87" y="401" width="365" height="36" fill="white"/><rect x="87" y="401" width="365" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(92 401)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="135.26" y="11" textLength="84.480003"><<interface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="143.636" y="29" textLength="8.5080004">T</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="151.064" y="29" textLength="60.3">reeEditor</tspan></text><rect x="35" y="603.75" width="234" height="36" fill="white"/><rect x="35" y="603.75" width="234" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(40 603.75)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="196.40401">+ Evaluation eval(Iterable<Node> </tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="140.808">path,Node child,int pos)</tspan></text><rect x="35" y="585.75" width="234" height="18" fill="white"/><rect x="35" y="585.75" width="234" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(40 585.75)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="80.278" y="11" textLength="63.444">NodePath</tspan></text><ellipse cx="94.125" cy="682.25" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="94.125" cy="682.25" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><ellipse cx="206.625" cy="682.25" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="206.625" cy="682.25" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="94.52801" y1="663.95404" x2="119.01353" y2="645.97332" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="206.625" y1="664.25" x2="183.43375" y2="646.20646" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="269.49999" y1="324.75" x2="269.49999" y2="390.48571" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><path d="M 227.09433 198.45006 L 45 297 L 235.93773 400.76126" marker-start="url(#Arrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="167.90797" y1="578.26664" x2="234.40946" y2="509.35978" marker-start="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(173.625 716.5)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="7.6430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".4165039" y="22" textLength="76.16699">Iterable<Integer></tspan></text><text transform="translate(53.375 716.5)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="10.1430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".3334961" y="22" textLength="6.1083984">T</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="6.0756836" y="22" textLength="75.59082">raverseEvaluator</tspan></text><ellipse cx="401.75" cy="629" rx="18.250029" ry="18.000029" fill="white"/><ellipse cx="401.75" cy="629" rx="18.250029" ry="18.000029" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(363.5 653)" fill="black"><tspan font-family="Helvetica" font-size="10" font-weight="500" x="8.1430664" y="10" textLength="61.713867"><<interface>></tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x=".0034179688" y="22" textLength="30.014648">NodeT</tspan><tspan font-family="Helvetica" font-size="10" font-weight="500" x="29.651855" y="22" textLength="48.344727">ransformer</tspan></text><line x1="304.34595" y1="509.361" x2="394.82106" y2="603.7698" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/version_control_api.graffle Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,1224 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>ApplicationVersion</key> + <array> + <string>com.omnigroup.OmniGraffle</string> + <string>139.16.0.171715</string> + </array> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {559, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>CreationDate</key> + <string>2012-12-10 14:12:27 +0000</string> + <key>Creator</key> + <string>shoshi</string> + <key>DisplayScale</key> + <string>1 0/72 in = 1 0/72 in</string> + <key>GraphDocumentVersion</key> + <integer>8</integer> + <key>GraphicsList</key> + <array> + <dict> + <key>Bounds</key> + <string>{{297, 639.25}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>67</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Bounds</key> + <string>{{292, 532.75}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>66</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>61</integer> + </dict> + <key>ID</key> + <integer>65</integer> + <key>Points</key> + <array> + <string>{279.49998867250389, 620.5}</string> + <string>{279.49998867250389, 665.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>58</integer> + </dict> + <key>ID</key> + <integer>64</integer> + <key>Points</key> + <array> + <string>{279.5000141916604, 514}</string> + <string>{279.5000141916604, 565.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>Arrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>41</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + <key>ID</key> + <integer>63</integer> + <key>Points</key> + <array> + <string>{279.49998069032409, 459}</string> + <string>{279.49998069032409, 160.5}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{167.25, 666}, {224.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>61</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<enum>>\ +MergeResult.Status}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{167.25, 702}, {224.5, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>62</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ MergeResult.Status SUCCESS\ ++ MergeResult.Status CONFLICT}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>61</integer> + <integer>62</integer> + <array/> + </array> + <key>ID</key> + <integer>60</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{146.5, 566}, {266, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>58</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +MergeResult}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{146.5, 602}, {266, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>59</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ MergeResult.Status getStatus()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>58</integer> + <integer>59</integer> + <array/> + </array> + <key>ID</key> + <integer>57</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{167.25, 429}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>56</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>49</integer> + </dict> + <key>ID</key> + <integer>54</integer> + <key>Points</key> + <array> + <string>{267.44511071737571, 459.08164128769772}</string> + <string>{142.16435336472233, 267.66835871230228}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>40</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{395, 201}, {54, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>53</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 <<uses>>}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>37</integer> + </dict> + <key>ID</key> + <integer>52</integer> + <key>Points</key> + <array> + <string>{323.25495102031016, 160.35986235117099}</string> + <string>{391.28974171712002, 230.89013764882901}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>1</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>48</integer> + </dict> + <key>ID</key> + <integer>51</integer> + <key>Points</key> + <array> + <string>{227.55150227594322, 160.32873362648911}</string> + <string>{146.65053390666884, 230.92054293761089}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>FilledArrow</string> + <key>HeadScale</key> + <real>1.0142860412597656</real> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>35</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{34, 231.25}, {204, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>48</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 TipChangeSet}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{34, 249.25}, {204, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>49</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ TreeEditor getEditor()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>48</integer> + <integer>49</integer> + <array/> + </array> + <key>ID</key> + <integer>47</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{87.5, 459.5}, {384, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>40</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<inteface>>\ +Merger}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{87.5, 495.5}, {384, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>41</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ MergeResult merge(TipChangeSet local,ChangeSet remote)}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>40</integer> + <integer>41</integer> + <array/> + </array> + <key>ID</key> + <integer>39</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{297, 231.25}, {224, 36}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>37</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 <<enum>>\ +Command}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{297, 267.25}, {224, 84}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>46</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\fs24 \cf0 + Command APPEND_CHILD\ ++ Command DELETE_CHILD\ ++ Command PUT_ATTRIBUTE\ ++ Command DELETE_ATTRIBUTE\ +\ ++ NodePath getPath()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>37</integer> + <integer>46</integer> + <array/> + </array> + <key>ID</key> + <integer>36</integer> + </dict> + <dict> + <key>Class</key> + <string>TableGroup</string> + <key>Graphics</key> + <array> + <dict> + <key>Bounds</key> + <string>{{153.5, 52}, {252, 18}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>34</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 ChangeSet}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{153.5, 70}, {252, 90}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>35</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>GradientCenter</key> + <string>{-0.29411799999999999, -0.264706}</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Align</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\deftab720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ri-380 + +\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 ++ Tree getTree()\ ++ ChangeSet previous()\ ++ String ownerid()\ ++ long revision()\ ++ Iterable<Command> getCommands()}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>TextPlacement</key> + <integer>0</integer> + </dict> + </array> + <key>GridH</key> + <array> + <integer>34</integer> + <integer>35</integer> + <array/> + </array> + <key>ID</key> + <integer>33</integer> + </dict> + <dict> + <key>Bounds</key> + <string>{{11, 11}, {131, 28}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>YES</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>3</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Version Control & Merge\ +API}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + <key>Wrap</key> + <string>NO</string> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>GuidesLocked</key> + <string>NO</string> + <key>GuidesVisible</key> + <string>YES</string> + <key>HPages</key> + <integer>1</integer> + <key>ImageCounter</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>LinksVisible</key> + <string>NO</string> + <key>MagnetsVisible</key> + <string>NO</string> + <key>MasterSheets</key> + <array/> + <key>ModificationDate</key> + <string>2012-12-10 15:05:11 +0000</string> + <key>Modifier</key> + <string>shoshi</string> + <key>NotesVisible</key> + <string>NO</string> + <key>Orientation</key> + <integer>2</integer> + <key>OriginVisible</key> + <string>NO</string> + <key>PageBreaks</key> + <string>YES</string> + <key>PrintInfo</key> + <dict> + <key>NSBottomMargin</key> + <array> + <string>float</string> + <string>41</string> + </array> + <key>NSHorizonalPagination</key> + <array> + <string>coded</string> + <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string> + </array> + <key>NSLeftMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSPaperSize</key> + <array> + <string>size</string> + <string>{595, 842}</string> + </array> + <key>NSPrintReverseOrientation</key> + <array> + <string>int</string> + <string>0</string> + </array> + <key>NSRightMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + <key>NSTopMargin</key> + <array> + <string>float</string> + <string>18</string> + </array> + </dict> + <key>PrintOnePage</key> + <false/> + <key>ReadOnly</key> + <string>NO</string> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 1</string> + <key>SmartAlignmentGuidesActive</key> + <string>YES</string> + <key>SmartDistanceGuidesActive</key> + <string>YES</string> + <key>UniqueID</key> + <integer>1</integer> + <key>UseEntirePage</key> + <false/> + <key>VPages</key> + <integer>1</integer> + <key>WindowInfo</key> + <dict> + <key>CurrentSheet</key> + <integer>0</integer> + <key>ExpandedCanvases</key> + <array/> + <key>Frame</key> + <string>{{-2394, 90}, {693, 922}}</string> + <key>ListView</key> + <true/> + <key>OutlineWidth</key> + <integer>142</integer> + <key>RightSidebar</key> + <false/> + <key>ShowRuler</key> + <true/> + <key>Sidebar</key> + <true/> + <key>SidebarWidth</key> + <integer>120</integer> + <key>VisibleRegion</key> + <string>{{0, 0}, {558, 783}}</string> + <key>Zoom</key> + <real>1</real> + <key>ZoomValues</key> + <array> + <array> + <string>キャンバス 1</string> + <real>1</real> + <real>1</real> + </array> + </array> + </dict> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/document/version_control_api.svg Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="2 2 539 760" width="539pt" height="760pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-12-10 15:05Z</dc:date><!-- Produced by OmniGraffle Professional 5.4.4 --></metadata><defs><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 3 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="63.000004" slope="0" x-height="545" cap-height="766" ascent="880.00183" descent="-120.000244" font-weight="400"><font-face-src><font-face-name name="HiraKakuProN-W3"/></font-face-src></font-face><font-face font-family="Hiragino Kaku Gothic ProN" font-size="12" panose-1="2 11 6 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-60" underline-thickness="117" slope="0" x-height="562" cap-height="784" ascent="880.00183" descent="-120.000244" font-weight="bold"><font-face-src><font-face-name name="HiraKakuProN-W6"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-1 -5 11 10" markerWidth="11" markerHeight="10" color="black"><g><path d="M 8.1142883 0 L 0 -3.0428581 L 0 3.0428581 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>キャンバス 1</title><rect fill="white" width="559" height="783"/><g><title>レイヤー 1</title><text transform="translate(11 11)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".1328125" y="11" textLength="8.0039062">V</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="7.4804688" y="11" textLength="123.38672">ersion Control & Merge</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="55.8291" y="25" textLength="19.341797">API</tspan></text><rect x="153.5" y="70" width="252" height="90" fill="white"/><rect x="153.5" y="70" width="252" height="90" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(158.5 70)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="97.980003">+ Tree getTree()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="140.46001">+ ChangeSet previous()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="47" textLength="107.244003">+ String ownerid()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="65" textLength="95.616">+ long revision()</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="83" textLength="228.96">+ Iterable<Command> getCommands()</tspan></text><rect x="153.5" y="52" width="252" height="18" fill="white"/><rect x="153.5" y="52" width="252" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(158.5 52)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="85.672" y="11" textLength="70.656">ChangeSet</tspan></text><rect x="297" y="267.25" width="224" height="84" fill="white"/><rect x="297" y="267.25" width="224" height="84" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(302 267.25)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x="0" y="11" textLength="69.029297">+ Command </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="68.373047" y="11" textLength="92.027344">APPEND_CHILD</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="0" y="25" textLength="158.390625">+ Command DELETE_CHILD</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="0" y="39" textLength="107.70703">+ Command PUT_A</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="106.822266" y="39" textLength="58.664062">TTRIBUTE</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="0" y="53" textLength="130.38867">+ Command DELETE_A</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="129.50391" y="53" textLength="58.664062">TTRIBUTE</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="0" y="81" textLength="116.4082">+ NodePath getPath()</tspan></text><rect x="297" y="231.25" width="224" height="36" fill="white"/><rect x="297" y="231.25" width="224" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(302 231.25)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="76.082" y="11" textLength="61.836"><<enum>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="74.018" y="29" textLength="65.963997">Command</tspan></text><rect x="87.5" y="495.5" width="384" height="18" fill="white"/><rect x="87.5" y="495.5" width="384" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(92.5 495.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="367.452">+ MergeResult merge(TipChangeSet local,ChangeSet remote)</tspan></text><rect x="87.5" y="459.5" width="384" height="36" fill="white"/><rect x="87.5" y="459.5" width="384" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(92.5 459.5)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="147.712" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="163.378" y="29" textLength="47.244">Merger</tspan></text><rect x="34" y="249.25" width="204" height="18" fill="white"/><rect x="34" y="249.25" width="204" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(39 249.25)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="142.296005">+ TreeEditor getEditor()</tspan></text><rect x="34" y="231.25" width="204" height="18" fill="white"/><rect x="34" y="231.25" width="204" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(39 231.25)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="51.544" y="11" textLength="90.912">TipChangeSet</tspan></text><line x1="227.56574" y1="160.328785" x2="154.23106" y2="224.33609" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="323.25495" y1="160.35986" x2="384.33722" y2="223.6826" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(395 201)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><line x1="267.44511" y1="459.08164" x2="147.64853" y2="276.04749" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(167.25 429)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><rect x="146.5" y="602" width="266" height="18" fill="white"/><rect x="146.5" y="602" width="266" height="18" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(151.5 602)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="198.552">+ MergeResult.Status getStatus()</tspan></text><rect x="146.5" y="566" width="266" height="36" fill="white"/><rect x="146.5" y="566" width="266" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(151.5 566)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="88.712" y="11" textLength="78.575996"><<inteface>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="87.044" y="29" textLength="81.912003">MergeResult</tspan></text><rect x="167.25" y="702" width="224.5" height="36" fill="white"/><rect x="167.25" y="702" width="224.5" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(172.25 702)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="11" textLength="191.58">+ MergeResult.Status SUCCESS</tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="400" x="0" y="29" textLength="194.556">+ MergeResult.Status CONFLICT</tspan></text><rect x="167.25" y="666" width="224.5" height="36" fill="white"/><rect x="167.25" y="666" width="224.5" height="36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(172.25 666)" fill="black"><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="76.332" y="11" textLength="61.836"><<enum>></tspan><tspan font-family="Hiragino Kaku Gothic ProN" font-size="12" font-weight="bold" x="43.776" y="29" textLength="126.948">MergeResult.Status</tspan></text><line x1="279.49998" y1="459" x2="279.49998" y2="170.51429" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="279.50001" y1="514" x2="279.50001" y2="555.4857" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><line x1="279.49999" y1="620.5" x2="279.49999" y2="655.4857" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" stroke-dasharray="4,4"/><text transform="translate(292 532.75)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text><text transform="translate(297 639.25)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31054688" y="11" textLength="53.378906"><<uses>></tspan></text></g></g></svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jungle-core.iml Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id="jungle-core" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="1.0" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/build/classes/main" /> + <output-test url="file://$MODULE_DIR$/build/classes/test" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> + <excludeFolder url="file://$MODULE_DIR$/.gradle" /> + <excludeFolder url="file://$MODULE_DIR$/build" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Gradle: org.mongodb:mongo-java-driver:3.0.0" level="project" /> + <orderEntry type="library" name="Gradle: commons-collections:commons-collections:3.2.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.maven.surefire:surefire-junit4:2.13" level="project" /> + <orderEntry type="library" name="Gradle: com.google.guava:guava:12.0" level="project" /> + <orderEntry type="library" name="Gradle: junit:junit:4.7" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-servlet:9.2.1.v20140609" level="project" /> + <orderEntry type="library" name="Gradle: org.hectorclient:hector-core:1.1-2" level="project" /> + <orderEntry type="library" name="Gradle: com.github.stephenc.eaio-uuid:uuid:3.3.0" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.cassandra:cassandra-all:1.2.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.maven.surefire:surefire-api:2.13" level="project" /> + <orderEntry type="library" name="Gradle: com.google.code.findbugs:jsr305:1.3.9" level="project" /> + <orderEntry type="library" name="Gradle: javax.servlet:javax.servlet-api:3.1.0" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-security:9.2.1.v20140609" level="project" /> + <orderEntry type="library" name="Gradle: commons-pool:commons-pool:1.5.3" level="project" /> + <orderEntry type="library" name="Gradle: com.ecyrd.speed4j:speed4j:0.9" level="project" /> + <orderEntry type="library" name="Gradle: org.xerial.snappy:snappy-java:1.0.4.1" level="project" /> + <orderEntry type="library" name="Gradle: com.ning:compress-lzf:0.8.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-cli:commons-cli:1.1" level="project" /> + <orderEntry type="library" name="Gradle: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3" level="project" /> + <orderEntry type="library" name="Gradle: org.antlr:antlr:3.2" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.cassandra.deps:avro:1.4.0-cassandra-1" level="project" /> + <orderEntry type="library" name="Gradle: org.codehaus.jackson:jackson-core-asl:1.9.2" level="project" /> + <orderEntry type="library" name="Gradle: org.codehaus.jackson:jackson-mapper-asl:1.9.2" level="project" /> + <orderEntry type="library" name="Gradle: jline:jline:1.0" level="project" /> + <orderEntry type="library" name="Gradle: com.googlecode.json-simple:json-simple:1.1" level="project" /> + <orderEntry type="library" name="Gradle: com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2" level="project" /> + <orderEntry type="library" name="Gradle: org.yaml:snakeyaml:1.6" level="project" /> + <orderEntry type="library" name="Gradle: edu.stanford.ppl:snaptree:0.1" level="project" /> + <orderEntry type="library" name="Gradle: com.yammer.metrics:metrics-core:2.0.3" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.thrift:libthrift:0.7.0" level="project" /> + <orderEntry type="library" name="Gradle: com.github.stephenc:jamm:0.2.5" level="project" /> + <orderEntry type="library" name="Gradle: org.antlr:antlr-runtime:3.2" level="project" /> + <orderEntry type="library" name="Gradle: org.mortbay.jetty:jetty:6.1.22" level="project" /> + <orderEntry type="library" name="Gradle: javax.servlet:servlet-api:2.5" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpclient:4.0.1" level="project" /> + <orderEntry type="library" name="Gradle: org.antlr:stringtemplate:3.2" level="project" /> + <orderEntry type="library" name="Gradle: org.mortbay.jetty:jetty-util:6.1.22" level="project" /> + <orderEntry type="library" name="Gradle: org.mortbay.jetty:servlet-api:2.5-20081211" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore:4.0.1" level="project" /> + <orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.1.1" level="project" /> + <orderEntry type="library" name="Gradle: antlr:antlr:2.7.7" level="project" /> + <orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.2" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.cassandra:cassandra-thrift:1.2.1" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-server:9.2.1.v20140609" level="project" /> + <orderEntry type="library" name="Gradle: commons-lang:commons-lang:2.5" level="project" /> + <orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.3" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-http:9.2.1.v20140609" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-io:9.2.1.v20140609" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-util:9.2.1.v20140609" level="project" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar:///usr/share/java/mysql-connector-java-5.1.40-bin.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pom.xml Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,58 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>jungle</groupId> + <artifactId>jungle-core</artifactId> + <version>0.0.3-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>jungle-core</name> + <url>http://maven.apache.org</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.7</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>12.0</version> + </dependency> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.2.1</version> + </dependency> + <dependency> + <groupId>org.functionaljava</groupId> + <artifactId>functionaljava</artifactId> + <version>4.2-beta-1</version> + </dependency> + + <dependency> + <groupId>org.apache.maven.surefire</groupId> + <artifactId>surefire-junit4</artifactId> + <version>2.13</version> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + </plugins> + </build> +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/DefaultJungle.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,92 @@ +package jp.ac.u_ryukyu.ie.cr.jungle; + + +import jp.ac.u_ryukyu.ie.cr.jungle.persistent.Journal; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.DefaultTreeOperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.TreeOperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; +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.persistent.NullJournal; +import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; +import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +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.traverser.InterfaceTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +import java.util.Iterator; +import java.util.concurrent.ConcurrentHashMap; + +public class DefaultJungle implements Jungle { + private Journal journal; + private ConcurrentHashMap<String, JungleTree> trees; + private String uuid; + private TreeEditor editor; + + public static void main(String args[]) { + DefaultJungle j = new DefaultJungle(null, "hoge", new DefaultTreeEditor(new DefaultTraverser())); + JungleTree t = j.createNewTree("fuga"); + + JungleTreeEditor e1 = t.getTreeEditor(); + + DefaultNodePath root = new DefaultNodePath(); + + Either<Error, JungleTreeEditor> either = e1.addNewChildAt(root, 0); + e1 = either.b(); + either = e1.addNewChildAt(root.add(0), 0); + e1 = either.b(); + e1.success(); + } + + public DefaultJungle(Journal journal, String uuid, TreeEditor editor) { + this.journal = new NullJournal(); + this.trees = new ConcurrentHashMap<String, JungleTree>(); + this.uuid = uuid; + this.editor = editor; + } + + @Override + public JungleTree getTreeByName(String name) { + return trees.get(name); + } + + @Override + public JungleTree createNewTree(final String name) { + ChangeList list = new ChangeList() { + @Override + public Iterator<TreeOperation> iterator() { + List<TreeOperation> nil = new List<>(); + return nil.iterator(); + } + + @Override + public String uuid() { + return uuid; + } + + @Override + public String getTreeName() { + return name; + } + + @Override + public TreeOperationLog getLog() { + return new DefaultTreeOperationLog(); + } + + }; + DefaultTreeNode root = new DefaultTreeNode(); + InterfaceTraverser traverser = new InterfaceTraverser(root, true); + TreeContext tc = new DefaultTreeContext(root, null, list, uuid, name, 0, traverser); + JungleTree newTree = new DefaultJungleTree(tc, uuid, journal.getWriter(), editor); + if (trees.putIfAbsent(name, newTree) != null) { + return null; + } + return newTree; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/DefaultJungleTree.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,113 @@ +package jp.ac.u_ryukyu.ie.cr.jungle; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +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.persistent.ChangeListWriter; +import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; +import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultJungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTransactionManager; +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.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.GetOldTreeError; +import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.util.concurrent.atomic.AtomicReference; + +public class DefaultJungleTree implements JungleTree { + + private final AtomicReference<TreeContext> repository; + private final String uuid; + private final ChangeListWriter writer; + private final TreeEditor treeEditor; + + public DefaultJungleTree(TreeContext tc, String uuid, ChangeListWriter writer, TreeEditor editor) { + this.repository = new AtomicReference<TreeContext>(tc); + this.uuid = uuid; + this.writer = writer; + this.treeEditor = editor; + } + + @Override + public JungleTreeEditor getTreeEditor() { + TreeContext tc = repository.get(); + DefaultTransactionManager txManager = new DefaultTransactionManager(writer, tc, repository, uuid); + TreeNode root = tc.getRoot(); + return new DefaultJungleTreeEditor(root, txManager, treeEditor); + } + + @Override + public JungleTreeEditor getLocalTreeEditor() { + return getTreeEditor(); + } + + @Override + public TreeNode getRootNode() { + TreeContext tc = repository.get(); + return tc.getRoot(); + } + + @Override + public InterfaceTraverser getTraverser(boolean useIndex) { + TreeContext tc = repository.get(); + return tc.getTraverser(); + } + + @Override + public ParentIndex getParentIndex() { + TreeContext tc = repository.get(); + return tc.getParentIndex(); + } + + @Override + public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + TreeContext tc = repository.get(); + return tc.getIndex(); + } + + @Override + public long revision() { + TreeContext tc = repository.get(); + return tc.revision(); + } + + @Override + public Either<Error, JungleTree> getOldTree(long revision) { + TreeContext tc = repository.get(); + + for (; tc.revision() != revision; ) { + tc = tc.prev(); + if (tc == null) + return DefaultEither.newA(GetOldTreeError.OLD_TREE_NOT_FOUND); + } + + + String oldTreeUuid = uuid + revision; + JungleTree oldTree = new DefaultJungleTree(tc, oldTreeUuid, writer, treeEditor); + return DefaultEither.newB(oldTree); + } + + @Override + public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> getNodeOfPath(NodePath path) { + TreeNode node = repository.get().getRoot(); + for (int num : path) { + if (num == -1) + continue; + Either<Error, TreeNode> either = node.getChildren().at(num); + if (either.isA()) + return either; + node = either.b(); + } + return DefaultEither.newB(node); + } + + @Override + public void setBufferSize(int _bufferSize) { + // not use + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/Jungle.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,8 @@ +package jp.ac.u_ryukyu.ie.cr.jungle; + + +public interface Jungle +{ + public JungleTree getTreeByName(String name); + public JungleTree createNewTree(String name); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/JungleTree.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,33 @@ +package jp.ac.u_ryukyu.ie.cr.jungle; + + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +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.store.index.ParentIndex; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +public interface JungleTree { + public JungleTreeEditor getTreeEditor(); + + public JungleTreeEditor getLocalTreeEditor(); + + public TreeNode getRootNode(); + + public long revision(); + + public Either<Error, JungleTree> getOldTree(long revision); + + public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex(); + + public ParentIndex getParentIndex(); + + public InterfaceTraverser getTraverser(boolean useIndex); + + public Either<Error, TreeNode> getNodeOfPath(NodePath path); + + public void setBufferSize(int _bufferSize); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/JungleTreeEditor.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,23 @@ +package jp.ac.u_ryukyu.ie.cr.jungle; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +import java.nio.ByteBuffer; + +public interface JungleTreeEditor +{ + + public Either<Error,JungleTreeEditor> addNewChildAt(NodePath path,int pos); + public Either<Error,JungleTreeEditor> deleteChildAt(NodePath path,int pos); + public Either<Error,JungleTreeEditor> putAttribute(NodePath path,String key,ByteBuffer value); + public Either<Error,JungleTreeEditor> deleteAttribute(NodePath path,String key); + public Either<Error, JungleTreeEditor> replaceNewRootNode(); + public Either<Error,JungleTreeEditor> edit(NodePath path,NodeEditor editor); + public Either<Error,JungleTreeEditor> success(); + public Either<Error,JungleTreeEditor> flushSuccess(); + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/App.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,83 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import me.prettyprint.hector.api.HConsistencyLevel; +import org.mortbay.jetty.Connector; +import org.mortbay.jetty.Server; +import org.mortbay.jetty.nio.SelectChannelConnector; +import org.mortbay.jetty.servlet.ServletHandler; +import org.mortbay.jetty.servlet.ServletHolder; +import org.mortbay.thread.QueuedThreadPool; + +import javax.servlet.Servlet; + + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) throws Exception + { + BulletinBoard cassaBBS = null; + if(args.length == 0){ + cassaBBS = new JungleBulletinBoard(); + }else{ + HConsistencyLevel cLevel = HConsistencyLevel.QUORUM; + int rep_factor = 1; + int i=0; + while(i<args.length) { + if(args[i].equals("-all")) { + cLevel = HConsistencyLevel.ALL; + }else if(args[i].equals("-one")){ + cLevel = HConsistencyLevel.ONE; + }else if(args[i].equals("-quorum")){ + cLevel = HConsistencyLevel.QUORUM; + }else if(args[i].equals("-any")){ + cLevel = HConsistencyLevel.ANY; + }else if(args[i].equals("-rep")){ + i++; + rep_factor = Integer.parseInt(args[i]); + } + i++; + } + System.out.println("ConsistencyLevel "+cLevel.toString()); + System.out.println("Replication factor "+rep_factor); + cassaBBS = new CassandraBulletinBoard("test-cluster","localhost:9160","cassaBBS2", cLevel, rep_factor); + } + + String createBoardMessagePath = "/createBoardMessage"; + String createBoardPath = "/createBoard"; + String editMessagePath = "/editMessage"; + String showBoardMessagePath = "/showBoardMessage"; + + Servlet createBoardMessage = new CreateBoardMessageServlet(cassaBBS); + Servlet createBoard = new CreateBoardServlet(cassaBBS); + Servlet editBoardMessage = new EditMessageServlet(cassaBBS); + Servlet index = new ShowBoardsServlet(cassaBBS,createBoardPath,showBoardMessagePath); + Servlet board = new ShowBoardMessageServlet(cassaBBS,createBoardMessagePath,editMessagePath); + +// Server serv = new Server(8080); + Server serv = new Server(); + SelectChannelConnector connector = new SelectChannelConnector(); + connector.setPort(8080); + connector.setThreadPool(new QueuedThreadPool(1000)); + serv.setConnectors(new Connector[] { connector }); + + ServletHandler context = new ServletHandler(); + context.addServletWithMapping(new ServletHolder(createBoardMessage),createBoardMessagePath); + context.addServletWithMapping(new ServletHolder(createBoard),createBoardPath); + context.addServletWithMapping(new ServletHolder(editBoardMessage),editMessagePath); + context.addServletWithMapping(new ServletHolder(index),"/"); + context.addServletWithMapping(new ServletHolder(board),showBoardMessagePath); + /* + * For write benchmark + */ + String editMessageUseGetPath = "/editMessageUseGet"; + Servlet editMessageUseGet = new EditMessageUseGetServlet(cassaBBS); + context.addServletWithMapping(new ServletHolder(editMessageUseGet), editMessageUseGetPath); + + serv.addHandler(context); + serv.start(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/BoardMessage.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,8 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +public interface BoardMessage +{ + public String getUUID(); + public String getAuthor(); + public String getMessage(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/BulletinBoard.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,11 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +public interface BulletinBoard +{ + public Iterable<String> getBoards(); + public void createBoards(String _name, String _author, String _initMessage, String _editKey); + public void createBoardMessage(String _board, String _author, String _message, String _editKey); + public void editMessage(String _board, String _uuid, String _author, String _message, String _editKey); + public String sanitize(String str); + GetAttributeImp getAttribute(String _bname, String _nodeNum, String revisionStr); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CassandraBulletinBoard.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,219 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import me.prettyprint.cassandra.model.ConfigurableConsistencyLevel; +import me.prettyprint.cassandra.serializers.StringSerializer; +import me.prettyprint.cassandra.serializers.UUIDSerializer; +import me.prettyprint.cassandra.service.template.SuperCfResult; +import me.prettyprint.cassandra.service.template.SuperCfUpdater; +import me.prettyprint.cassandra.service.template.ThriftSuperCfTemplate; +import me.prettyprint.cassandra.utils.TimeUUIDUtils; +import me.prettyprint.hector.api.Cluster; +import me.prettyprint.hector.api.HConsistencyLevel; +import me.prettyprint.hector.api.Keyspace; +import me.prettyprint.hector.api.beans.HSuperColumn; +import me.prettyprint.hector.api.beans.OrderedSuperRows; +import me.prettyprint.hector.api.beans.SuperRow; +import me.prettyprint.hector.api.beans.SuperSlice; +import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition; +import me.prettyprint.hector.api.ddl.ColumnType; +import me.prettyprint.hector.api.ddl.ComparatorType; +import me.prettyprint.hector.api.ddl.KeyspaceDefinition; +import me.prettyprint.hector.api.factory.HFactory; +import me.prettyprint.hector.api.query.QueryResult; +import me.prettyprint.hector.api.query.RangeSuperSlicesQuery; +import me.prettyprint.hector.api.query.SuperSliceQuery; +import org.apache.cassandra.locator.SimpleStrategy; + +import java.util.*; + +public class CassandraBulletinBoard implements BulletinBoard +{ + private final String address; + private final String clusterName; + private final Cluster cluster; + private final String keyspace; + private final ConfigurableConsistencyLevel configurableConsistencyLevel = new ConfigurableConsistencyLevel(); + + private static final String COLUMN_FAMILY_BOARD = "boards"; + private final int REP_FACTOR; + + public CassandraBulletinBoard(String _clusterName,String _address,String _keyspaceName, HConsistencyLevel cLevel,int rep_factor ) + { + address = _address; + clusterName = _clusterName; + keyspace = _keyspaceName; + cluster = HFactory.getOrCreateCluster(clusterName,address); + Map<String, HConsistencyLevel> clmap = new HashMap<String, HConsistencyLevel>(); + clmap.put(COLUMN_FAMILY_BOARD, cLevel); + configurableConsistencyLevel.setReadCfConsistencyLevels(clmap); + configurableConsistencyLevel.setWriteCfConsistencyLevels(clmap); + REP_FACTOR = rep_factor; + initialize(); + } + + public CassandraBulletinBoard(String _clusterName,String _address,String _keyspaceName, HConsistencyLevel cLevel) + { + this(_clusterName, _address, _keyspaceName, cLevel, 1); + } + + + + private void initialize() + { + if(cluster.describeKeyspace(keyspace) == null){ + KeyspaceDefinition keyspaceDefinition = HFactory.createKeyspaceDefinition(keyspace, + SimpleStrategy.class.getName(),REP_FACTOR,Collections.<ColumnFamilyDefinition> emptyList()); + cluster.addKeyspace(keyspaceDefinition,false); + ColumnFamilyDefinition columnFamilyDefinition = HFactory.createColumnFamilyDefinition(keyspace,COLUMN_FAMILY_BOARD,ComparatorType.UUIDTYPE); + columnFamilyDefinition.setColumnType(ColumnType.SUPER); + cluster.addColumnFamily(columnFamilyDefinition); + } + } + + public Iterable<String> getBoards() + { + Keyspace ksp = HFactory.createKeyspace(keyspace, cluster, configurableConsistencyLevel); + RangeSuperSlicesQuery<String,UUID,String,String> query = HFactory.createRangeSuperSlicesQuery(ksp,StringSerializer.get(), + UUIDSerializer.get(),StringSerializer.get(),StringSerializer.get()); + query.setColumnFamily(COLUMN_FAMILY_BOARD).setKeys(null,null).setRange(null,null,false,0); + + QueryResult<OrderedSuperRows<String,UUID,String,String>> result = query.execute(); + OrderedSuperRows<String,UUID,String,String> rows = result.get(); + List<SuperRow<String,UUID,String,String>> list = rows.getList(); + + IterableConverter.Converter<String,SuperRow<String,UUID,String,String>> converter + = new IterableConverter.Converter<String, SuperRow<String,UUID,String,String>>(){ + public String conv(SuperRow<String, UUID, String, String> _b) { + return _b.getKey(); + } + }; + + return new IterableConverter<String,SuperRow<String,UUID,String,String>>(list,converter); + } + + private static final String COLUMN_MESSAGE_AUTHOR = "author"; + private static final String COLUMN_MESSAGE_BODY = "message"; + private static final String COLUMN_MESSAGE_EDIT_KEY = "edit"; + + public void createBoardMessage(UUID _time,String _name,String _author,String _message,String _editKey) + { + Keyspace ksp = HFactory.createKeyspace(keyspace, cluster, configurableConsistencyLevel); + ThriftSuperCfTemplate<String,UUID,String> template = + new ThriftSuperCfTemplate<String,UUID,String>(ksp,COLUMN_FAMILY_BOARD,StringSerializer.get(), + UUIDSerializer.get(),StringSerializer.get()); + + SuperCfUpdater<String,UUID,String> updater = template.createUpdater(_name,_time); + updater.setString(COLUMN_MESSAGE_AUTHOR,_author); + updater.setString(COLUMN_MESSAGE_BODY,_message); + updater.setString(COLUMN_MESSAGE_EDIT_KEY,_editKey); + + template.update(updater); + } + + public void createBoards(String _name,String _author,String _initMessage,String _editKey) + { + UUID time = TimeUUIDUtils.getTimeUUID(0); + createBoardMessage(time,_name,_author,_initMessage,_editKey); + } + + public Iterable<BoardMessage> getMessages(String _boardName) + { + Keyspace ksp = HFactory.createKeyspace(keyspace, cluster, configurableConsistencyLevel); + SuperSliceQuery<String, UUID, String, String> query = HFactory.createSuperSliceQuery(ksp, StringSerializer.get(), UUIDSerializer.get(), StringSerializer.get(), StringSerializer.get()); + + UUID start = TimeUUIDUtils.getTimeUUID(0); + query.setKey(_boardName).setColumnFamily(COLUMN_FAMILY_BOARD).setRange(start,null,false,100); + + QueryResult<SuperSlice<UUID, String, String>> result = query.execute(); + SuperSlice<UUID,String,String> ss = result.get(); + List<HSuperColumn<UUID,String,String>> list = ss.getSuperColumns(); + + IterableConverter.Converter<BoardMessage,HSuperColumn<UUID,String,String>> converter = + new IterableConverter.Converter<BoardMessage,HSuperColumn<UUID,String,String>>(){ + public BoardMessage conv(HSuperColumn<UUID, String, String> _b){ + UUID uuid = _b.getName(); + String author = _b.getSubColumnByName(COLUMN_MESSAGE_AUTHOR).getValue(); + String message = _b.getSubColumnByName(COLUMN_MESSAGE_BODY).getValue(); + BoardMessageImpl bm = new BoardMessageImpl(author,message,uuid.toString()); + return bm; + } + }; + + + return new IterableConverter<BoardMessage,HSuperColumn<UUID,String,String>>(list,converter); + } + + private static class BoardMessageImpl implements BoardMessage + { + private final String author; + private final String message; + private final String uuid; + + public BoardMessageImpl(String _author,String _message,String _uuid) + { + author = _author; + message = _message; + uuid = _uuid; + } + + public String getAuthor() + { + return author; + } + + public String getMessage() + { + return message; + } + + public String getUUID() + { + return uuid; + } + } + + public void createBoardMessage(String _board, String _author, String _message,String _editKey) + { + UUID time = TimeUUIDUtils.getUniqueTimeUUIDinMillis(); + createBoardMessage(time,_board,_author,_message,_editKey); + } + + public void editMessage(String _board,String _uuid,String _author,String _message,String _editKey) + { + Keyspace ksp = HFactory.createKeyspace(keyspace, cluster, configurableConsistencyLevel); + UUID time = UUID.fromString(_uuid); + ThriftSuperCfTemplate<String,UUID,String> template = + new ThriftSuperCfTemplate<String,UUID,String>(ksp,COLUMN_FAMILY_BOARD,StringSerializer.get(), + UUIDSerializer.get(),StringSerializer.get()); + + SuperCfResult<String,UUID,String> result = template.querySuperColumn(_board,time); + String editKey = result.getString(COLUMN_MESSAGE_EDIT_KEY); + if(!editKey.equals(editKey)){ + return; + } + + SuperCfUpdater<String, UUID, String> updater = template.createUpdater(_board,time); + updater.setString(COLUMN_MESSAGE_AUTHOR,_author); + updater.setString(COLUMN_MESSAGE_BODY,_message); + updater.setString(COLUMN_MESSAGE_EDIT_KEY,_editKey); + + template.update(updater); + } + + public String sanitize( String str ) { + if(str==null) { + return str; + } + str = str.replaceAll("&" , "&" ); + str = str.replaceAll("<" , "<" ); + str = str.replaceAll(">" , ">" ); + str = str.replaceAll("\"", """); + str = str.replaceAll("'" , "'" ); + return str; + } + + public GetAttributeImp getAttribute(String _bname, String _nodeNum, String revisionStr) { + return null; // 未実装 使うときに実装する + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CreateBoardMessageServlet.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,39 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; + +public class CreateBoardMessageServlet extends HttpServlet +{ + private final BulletinBoard bbs; + private static final String PARAM_BOARD_NAME = "bname"; + private static final String PARAM_BOARD_AUTHOR = "author"; + private static final String PARAM_BOARD_MESSAGE= "msg"; + private static final String PARAM_BOARD_EDITKEY = "key"; + + private static final long serialVersionUID = 1L; + + public CreateBoardMessageServlet(BulletinBoard _bbs) + { + bbs = _bbs; + } + + @Override + public void doPost(HttpServletRequest _req,HttpServletResponse _res) + { + String boardName = _req.getParameter(PARAM_BOARD_NAME); + String author = _req.getParameter(PARAM_BOARD_AUTHOR); + String msg = _req.getParameter(PARAM_BOARD_MESSAGE); + String key = _req.getParameter(PARAM_BOARD_EDITKEY); + + try{ + bbs.createBoardMessage(boardName,author,msg,key); + PrintWriter pw = _res.getWriter(); + pw.write("successfully written"); + }catch(Exception _e){ + _res.setStatus(500); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/CreateBoardServlet.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,40 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import org.apache.commons.lang.StringEscapeUtils; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; + +public class CreateBoardServlet extends HttpServlet +{ + private final BulletinBoard bbs; + private static final String PARAM_BOARD_NAME = "bname"; + private static final String PARAM_BOARD_AUTHOR = "author"; + private static final String PARAM_BOARD_INITMESSAGE= "msg"; + private static final String PARAM_BOARD_EDITKEY = "key"; + + private static final long serialVersionUID = 1L; + + public CreateBoardServlet(BulletinBoard _bbs) + { + bbs = _bbs; + } + + public void doPost(HttpServletRequest _req,HttpServletResponse _res) + { + String boardName = StringEscapeUtils.unescapeHtml(_req.getParameter(PARAM_BOARD_NAME)); + String author = StringEscapeUtils.unescapeHtml(_req.getParameter(PARAM_BOARD_AUTHOR)); + String msg = StringEscapeUtils.unescapeHtml(_req.getParameter(PARAM_BOARD_INITMESSAGE)); + String key = StringEscapeUtils.unescapeHtml(_req.getParameter(PARAM_BOARD_EDITKEY)); + + try{ + bbs.createBoards(boardName,author,msg,key); + PrintWriter pw = _res.getWriter(); + pw.write("successfully written"); + }catch(Exception _e){ + _res.setStatus(500); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/EditMessageServlet.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,63 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; + +public class EditMessageServlet extends HttpServlet +{ + private final BulletinBoard bbs; + private static final String PARAM_BOARD_NAME = "bname"; + private static final String PARAM_BOARD_MSGID = "uuid"; + private static final String PARAM_BOARD_AUTHOR = "author"; + private static final String PARAM_BOARD_MESSAGE= "msg"; + private static final String PARAM_BOARD_EDITKEY = "key"; + + private static final long serialVersionUID = 1L; + + public EditMessageServlet(BulletinBoard _bbs) + { + bbs = _bbs; + } + + public void doGet(HttpServletRequest _req,HttpServletResponse _res) + { + String bname = _req.getParameter(PARAM_BOARD_NAME); + String uuid = _req.getParameter(PARAM_BOARD_MSGID); + System.out.println("write"); + + try{ + PrintWriter pw = _res.getWriter(); + pw.write("<html><body><h1>edit message</h1>"); + pw.write("<form method='POST'\n"); + pw.write("<p>Author : <input type='text' name='author'/>" + + "<input type='hidden' name='key' value='"+uuid+"'/>" + + "<input type='hidden' name='bname' value='"+bname+"'</p>\n"); + pw.write("<p>Message<br/> <input type='textarea' name='msg'/> </p>\n"); + pw.write("<p><input type='submit' value='submit'/></p>\n"); + pw.write("</body></html>"); + pw.flush(); + }catch(Exception _e){ + _res.setStatus(500); + } + } + + public void doPost(HttpServletRequest _req,HttpServletResponse _res) + { + String boardName = _req.getParameter(PARAM_BOARD_NAME); + String author = _req.getParameter(PARAM_BOARD_AUTHOR); + String msg = _req.getParameter(PARAM_BOARD_MESSAGE); + String key = _req.getParameter(PARAM_BOARD_EDITKEY); + String uuid = _req.getParameter(PARAM_BOARD_MSGID); + + try{ + bbs.editMessage(boardName, uuid, author, msg, key); + PrintWriter pw = _res.getWriter(); + pw.write("successfully written"); + pw.flush(); + }catch(Exception _e){ + _res.setStatus(500); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/EditMessageUseGetServlet.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,40 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; + +public class EditMessageUseGetServlet extends HttpServlet{ + private final BulletinBoard bbs; + private static final String PARAM_BOARD_NAME = "bname"; + private static final String PARAM_BOARD_MSGID = "uuid"; + private static final String PARAM_BOARD_AUTHOR = "author"; + private static final String PARAM_BOARD_MESSAGE= "msg"; + private static final String PARAM_BOARD_EDITKEY = "key"; + + private static final long serialVersionUID = 1L; + + public EditMessageUseGetServlet(BulletinBoard _bbs) + { + bbs = _bbs; + } + + public void doGet(HttpServletRequest _req,HttpServletResponse _res) + { + String boardName = _req.getParameter(PARAM_BOARD_NAME); + String author = _req.getParameter(PARAM_BOARD_AUTHOR); + String msg = _req.getParameter(PARAM_BOARD_MESSAGE); + String key = _req.getParameter(PARAM_BOARD_EDITKEY); + String uuid = _req.getParameter(PARAM_BOARD_MSGID); + + try{ + bbs.editMessage(boardName, uuid, author, msg, key); + PrintWriter pw = _res.getWriter(); + pw.write("successfully written"); + pw.flush(); + }catch(Exception _e){ + _res.setStatus(500); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/GetAttributeImp.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,23 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; + +import java.util.Iterator; + +public class GetAttributeImp { + private final TreeNode node; + + public GetAttributeImp(TreeNode _node) { + node = _node; + } + + public String getMessage(String key) { + return node.getAttributes().getString(key); + } + + public Iterator<String> getKeys() { + return node.getAttributes().getKeys(); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/HectorSample.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,62 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import me.prettyprint.cassandra.serializers.StringSerializer; +import me.prettyprint.cassandra.serializers.UUIDSerializer; +import me.prettyprint.cassandra.service.template.SuperCfUpdater; +import me.prettyprint.cassandra.service.template.ThriftSuperCfTemplate; +import me.prettyprint.cassandra.utils.TimeUUIDUtils; +import me.prettyprint.hector.api.*; +import me.prettyprint.hector.api.beans.*; +import me.prettyprint.hector.api.factory.HFactory; +import me.prettyprint.hector.api.query.QueryResult; +import me.prettyprint.hector.api.query.RangeSuperSlicesQuery; +import me.prettyprint.hector.api.query.SuperSliceQuery; + +import java.util.List; +import java.util.UUID; + +public class HectorSample +{ + public static void main(String _args[]) + { + Cluster myCluster = HFactory.getOrCreateCluster("test-cluster","localhost:9160"); + + Keyspace ksp = HFactory.createKeyspace("cassaBBS",myCluster); + + ThriftSuperCfTemplate<String,UUID,String> template = + new ThriftSuperCfTemplate<String,UUID,String>(ksp,"boards",StringSerializer.get(), + UUIDSerializer.get(),StringSerializer.get()); + UUID time = TimeUUIDUtils.getUniqueTimeUUIDinMillis(); + SuperCfUpdater<String,UUID,String> updater = template.createUpdater("board1",TimeUUIDUtils.getTimeUUID(0)); + updater.setString("name","peter"); + updater.setString("message",time.toString()); + + template.update(updater); + + UUID start = TimeUUIDUtils.getTimeUUID(0); + + SuperSliceQuery<String, UUID, String, String> sq = HFactory.createSuperSliceQuery(ksp, StringSerializer.get(), UUIDSerializer.get(), StringSerializer.get(), StringSerializer.get()); + sq.setKey("board1").setColumnFamily("ccc").setRange(start,null,false,100); + + QueryResult<SuperSlice<UUID,String,String>> results = sq.execute(); + + SuperSlice<UUID,String,String> ss = results.get(); + List<HSuperColumn<UUID,String,String>> list = ss.getSuperColumns(); + for(HSuperColumn<UUID,String,String> sc : list){ + HColumn<String,String> sub = sc.getSubColumnByName("name"); + System.out.println(sub.getValue()); + sub = sc.getSubColumnByName("message"); + System.out.println(sub.getValue()); + } + + RangeSuperSlicesQuery<String,UUID,String,String> rsq = HFactory.createRangeSuperSlicesQuery(ksp,StringSerializer.get(), + UUIDSerializer.get(),StringSerializer.get(),StringSerializer.get()); + rsq.setKeys(null,null).setRange(null,null,false,0).setColumnFamily("ccc"); + + QueryResult<OrderedSuperRows<String,UUID,String,String>> rsqResult = rsq.execute(); + OrderedSuperRows<String, UUID, String, String> rows = rsqResult.get(); + for(SuperRow<String, UUID, String, String> row : rows.getList()){ + System.out.println(row.getKey()); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/IterableConverter.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,52 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import java.util.Iterator; + +public class IterableConverter<A,B> implements Iterable<A> +{ + private final Iterable<B> iterable; + private final Converter<A,B> converter; + + public IterableConverter(Iterable<B> _iterable,Converter<A,B> _converter) + { + iterable = _iterable; + converter = _converter; + } + + public Iterator<A> iterator() + { + return new IteratorConverter<A,B>(iterable.iterator(),converter); + } + + private static final class IteratorConverter<A,B> implements Iterator<A> + { + private final Iterator<B> iterator; + private final Converter<A,B> converter; + + public IteratorConverter(Iterator<B> _iterator,Converter<A,B> _converter) + { + iterator = _iterator; + converter = _converter; + } + + public boolean hasNext() + { + return iterator.hasNext(); + } + + public A next() + { + return converter.conv(iterator.next()); + } + + public void remove() + { + iterator.remove(); + } + } + + public static interface Converter<A,B> + { + public A conv(B _b); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/JungleBulletinBoard.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,219 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.core.Children; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +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; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; + +import java.nio.ByteBuffer; +import java.util.concurrent.atomic.AtomicInteger; + +public class JungleBulletinBoard implements + BulletinBoard { + private final Jungle jungle; + + public JungleBulletinBoard() { + jungle = new DefaultJungle(null, "hoge", new DefaultTreeEditor( + new DefaultTraverser())); + jungle.createNewTree("boards"); + } + + public Iterable<String> getBoards() { + JungleTree tree = jungle.getTreeByName("boards"); + TreeNode node = tree.getRootNode(); + Children chs = node.getChildren(); + + IterableConverter.Converter<String, TreeNode> converter = new IterableConverter.Converter<String, TreeNode>() { + public String conv(TreeNode _b) { + ByteBuffer e = _b.getAttributes().get("name"); + return new String(e.array()); + } + }; + + return new IterableConverter<String, TreeNode>(chs, converter); + } + + public void createBoards(final String _name, final String _author, + final String _initMessage, final String _editKey) { + if (null == jungle.createNewTree(_name)) { + throw new IllegalStateException(); + } + JungleTree tree = jungle.getTreeByName("boards"); + JungleTreeEditor editor = tree.getTreeEditor(); + DefaultNodePath root = new DefaultNodePath(); + Either<Error, JungleTreeEditor> either = editor.addNewChildAt(root, 0); + if (either.isA()) { + throw new IllegalStateException(); + } + editor = either.b(); + + either = editor.putAttribute(root.add(0), "name", ByteBuffer.wrap(_name.getBytes())); + if (either.isA()) { + throw new IllegalStateException(); + } + editor = either.b(); + Either<Error, JungleTreeEditor> result = editor.success(); + if (result.isA()) { + throw new IllegalStateException(); + } + + tree = jungle.getTreeByName(_name); + editor = tree.getTreeEditor(); + editor = editor.putAttribute(root,"author", ByteBuffer.wrap(_author.getBytes())).b(); + editor = editor.putAttribute(root,"key", ByteBuffer.wrap(_editKey.getBytes())).b(); + either = editor.putAttribute(root,"mes", ByteBuffer.wrap(_initMessage.getBytes())); + + if (either.isA()) { + throw new IllegalStateException(); + } + editor = either.b(); + editor.success(); + } + + public void createBoardMessage(final String _board, final String _author, + final String _message, final String _editKey) { + JungleTree tree = jungle.getTreeByName(_board); + if (tree == null) { + throw new IllegalStateException(); + } + + JungleTreeEditor editor; + do { + TreeNode node = tree.getRootNode(); + int size = node.getChildren().size(); + DefaultNodePath path = new DefaultNodePath(); + + editor = tree.getTreeEditor(); + Either<Error, JungleTreeEditor> either = editor.addNewChildAt(path, + size); + if (either.isA()) { + throw new IllegalStateException(); + } + editor = either.b(); + editor = editor.putAttribute(path.add(size),"author", ByteBuffer.wrap(_author.getBytes())).b(); + editor = editor.putAttribute(path.add(size),"key", ByteBuffer.wrap(_editKey.getBytes())).b(); + either = editor.putAttribute(path.add(size),"mes", ByteBuffer.wrap(_message.getBytes())); + + if (either.isA()) { + throw new IllegalStateException(); + } + editor = either.b(); + }while (editor.success().isA()); + } + + public void editMessage(String _board, String _uuid, final String _author, + final String _message, final String _editKey) { + JungleTreeEditor editor = null; + do { + DefaultNodePath path = new DefaultNodePath(); + path = path.add(Integer.parseInt(_uuid)); + + JungleTree tree = jungle.getTreeByName(_board); + editor = tree.getTreeEditor(); + + editor = editor.putAttribute(path,"author", ByteBuffer.wrap(_author.getBytes())).b(); + editor = editor.putAttribute(path,"key", ByteBuffer.wrap(_editKey.getBytes())).b(); + Either<Error, JungleTreeEditor> either = editor.putAttribute(path,"mes", ByteBuffer.wrap(_message.getBytes())); + + if (either.isA()) { + throw new IllegalStateException(); + } + editor = either.b(); + }while (editor.success().isA()); + } + + public Iterable<BoardMessage> getMessages(String _boardName) { + JungleTree tree = jungle.getTreeByName(_boardName); + TreeNode node = tree.getRootNode(); + Children chs = node.getChildren(); + + final AtomicInteger counter = new AtomicInteger(0); + IterableConverter.Converter<BoardMessage, TreeNode> converter = new IterableConverter.Converter<BoardMessage, TreeNode>() { + public BoardMessage conv(TreeNode _b) { + String uuid = Integer.toString(counter.get()); + String author = new String(_b.getAttributes().get("author").array()); + String message = new String(_b.getAttributes().get("mes").array()); + counter.incrementAndGet(); + return new BoardMessageImpl(author, message, uuid); + } + }; + + return new IterableConverter<BoardMessage, TreeNode>(chs, converter); + } + + private static class BoardMessageImpl implements BoardMessage { + private final String author; + private final String message; + private final String uuid; + + public BoardMessageImpl(String _author, String _message, String _uuid) { + author = _author; + message = _message; + uuid = _uuid; + } + + public String getAuthor() { + return author; + } + + public String getMessage() { + return message; + } + + public String getUUID() { + return uuid; + } + } + + public String sanitize(String str) { + if (str == null) { + return str; + } + str = str.replaceAll("&", "&"); + str = str.replaceAll("<", "<"); + str = str.replaceAll(">", ">"); + str = str.replaceAll("\"", """); + str = str.replaceAll("'", "'"); + return str; + } + + public GetAttributeImp getAttribute(String _bname, String _nodeNum, String revisionStr) { + + DefaultNodePath path = new DefaultNodePath(); + try { + for (int count = 0; _nodeNum.substring(count, count + 1) != null; count++) { + if (!_nodeNum.substring(count, count + 1).equals("/")) + path = path.add(Integer.parseInt(_nodeNum.substring(count, count + 1))); + } + } catch (Exception _e) { + } + JungleTree tree = jungle.getTreeByName(_bname); + System.out.println(tree.revision()); + Long revision = Long.parseLong(revisionStr); + JungleTree oldTree = tree.getOldTree(revision).b(); + System.out.println(oldTree.revision()); + TreeNode node = oldTree.getRootNode(); + + DefaultTraverser traverser = new DefaultTraverser(); + DefaultEvaluator evaluator = new DefaultEvaluator(path); + Either<Error, Traversal> ret = traverser.traverse(node, evaluator); + if (ret.isA()) { + Assert.fail(); + } + + Traversal traversal = ret.b(); + TreeNode target = traversal.destination(); + return new GetAttributeImp(target); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/ShowBoardMessageServlet.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,55 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; +import java.util.Iterator; + +public class ShowBoardMessageServlet extends HttpServlet { + /** + * + */ + private static final long serialVersionUID = 1L; + private final BulletinBoard bbs; + private final String createBoardMessagePath; + + private static final String PARAM_BOARD_NAME = "bname"; + + public ShowBoardMessageServlet(BulletinBoard _bbs, String _createBoardMessagePath, String _editMessagePath) { + bbs = _bbs; + createBoardMessagePath = _createBoardMessagePath; + } + + public void doGet(HttpServletRequest _req, HttpServletResponse _res) { + String bname = _req.getParameter(PARAM_BOARD_NAME); + + try { + printBoard(bname, _res.getWriter()); + } catch (Exception _e) { + _res.setStatus(500); + } + + } + + private void printBoard(String _bname, PrintWriter _pw) throws Exception { + _pw.write("<html><body>\n"); + _pw.write("<h1>" + bbs.sanitize(_bname) + "</h1>\n"); + + _pw.write("<form action='" + createBoardMessagePath + "' method='POST'\n"); + _pw.write("<p>Author : <input type='text' name='author'/> <input type='hidden' name='bname' value='" + _bname + "'/> EditKey : <input type='text' name='key'/></p>\n"); + _pw.write("<p>Message<br/> <input type='textarea' name='msg'/> </p>\n"); + _pw.write("<p><input type='submit' value='submit'/></p>\n"); + GetAttributeImp attribute = bbs.getAttribute(_bname, "[-1]", "1"); + Iterator<String> keys = attribute.getKeys(); + + do { + String key = keys.next(); + String mesage = attribute.getMessage(key); + _pw.write("<p>" + key + " = " + mesage + "</p>\n"); + }while(keys.hasNext()); + + _pw.write("</body></html>"); + _pw.flush(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/bbs/ShowBoardsServlet.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,55 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.bbs; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; + +public class ShowBoardsServlet extends HttpServlet +{ + /** + * + */ + private static final long serialVersionUID = 1L; + private final BulletinBoard bbs; + private final String createBoardPath; + private final String showBoardMessagePath; + + public ShowBoardsServlet(BulletinBoard _bbs, String _createBoardPath,String _showBoardMessagePath) + { + bbs = _bbs; + createBoardPath = _createBoardPath; + showBoardMessagePath = _showBoardMessagePath; + } + + public void doGet(HttpServletRequest _req,HttpServletResponse _res) + { + try{ + _res.setCharacterEncoding("UTF-8"); + printBoard(_res.getWriter()); + }catch(Exception _e){ + _res.setStatus(500); + } + + } + + private void printBoard(PrintWriter _pw) throws Exception + { + _pw.write("<html><body>\n"); + _pw.write("<h1>BBS</h1>\n"); + _pw.write("<form action='"+createBoardPath+"' method='POST'\n"); + _pw.write("<p>Create new board.</p>"); + _pw.write("<p>BoardName : <input type='text' name='bname'/></p>\n"); + _pw.write("<p>Author : <input type='text' name='author'/> EditKey : <input type='text' name='key'/></p>\n"); + _pw.write("<p>Message<br/> <input type='textarea' name='msg'/> </p>\n"); + _pw.write("<p><input type='submit' value='submit'/></p><hr/>\n"); + + _pw.write("<h2>list of boards</h2>"); + for(String board : bbs.getBoards()){ + _pw.write("<p><a href='"+showBoardMessagePath+"?bname=" + bbs.sanitize(board) + "'>"+ bbs.sanitize(board) + "</a></p>"); + } + + _pw.write("</body></html>"); + _pw.flush(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/benchMark/Data/TreeMapBenchMark.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,29 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.benchMark.Data; + + +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.util.ArrayList; +import java.util.Collections; + +public class TreeMapBenchMark { + public static void main(String[] args) { + for (int i = 1; i <= 10; i++) { + TreeMap<Integer, Integer> map = new TreeMap<>(); + ArrayList<Integer> list = new ArrayList<>(); + + for (int count = 1; count < 100000 * i; count++) { + map = map.put(count, count); + list.add(count); + } + + Collections.shuffle(list); + long t1 = System.currentTimeMillis(); + for (Integer num : list) { + map = map.delete(num); + } + long t2 = System.currentTimeMillis(); + System.out.println((i * 100000) + " time = " + (t2 - t1)); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/benchMark/JungleBenchMark.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,58 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.benchMark; + +import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +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.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; + +import java.nio.ByteBuffer; +import java.util.Iterator; + + +/** + * Created by e115731 on 15/05/07. + */ +public class JungleBenchMark { + public static void main(String args[]) { + DefaultJungle jungle = new DefaultJungle(null, "sample", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("tree"); + JungleTree tree = jungle.getTreeByName("tree"); + JungleTreeEditor editor = tree.getTreeEditor(); + NodePath path = new DefaultNodePath(); + path = path.add(0); + for (int count = 1; count <= 10; count++) { + for (int personCount = 0; personCount < 1000 * count; personCount++) { + editor = editor.replaceNewRootNode().b(); + ByteBuffer value = ByteBuffer.wrap(("p:" + personCount).getBytes()); + editor = editor.putAttribute(path, "personId", value).b(); + ByteBuffer value2 = ByteBuffer.wrap(("r:" + personCount).getBytes()); + editor = editor.putAttribute(path, "roleId", value2).b(); + } + editor.success(); + long t1 = System.currentTimeMillis(); + for (int findCount = 0; findCount < 50000; ) { + InterfaceTraverser traverser = tree.getTraverser(true); + Iterator<TreeNode> it = traverser.find(null, "personId", "p:100"); + if (it.hasNext()) { + TreeNode targetNode = it.next(); + TreeNodeAttributes attribute = targetNode.getAttributes(); + String targetRoleId = attribute.getString("roleId"); + if (targetRoleId.equals("r:100")) + findCount++; + } else { + System.out.println("find miss"); + System.exit(1); + } + } + long t2 = System.currentTimeMillis(); + System.out.println("time = " + (t2 - t1)); + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/App.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,42 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core; + +import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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; + +import java.nio.ByteBuffer; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + DefaultJungle jungle = new DefaultJungle(null,"sample", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("hoge"); + JungleTree tree = jungle.getTreeByName("hoge"); + JungleTreeEditor editor = tree.getTreeEditor(); + DefaultNodePath path = new DefaultNodePath(); + + String key = "key"; + ByteBuffer value = ByteBuffer.wrap(key.getBytes()); + + Either<Error,JungleTreeEditor> either = editor.putAttribute(path,"key",value); + JungleTreeEditor e = either.b(); + e.success(); + + + TreeNode root = tree.getRootNode(); + ByteBuffer v = root.getAttributes().get(key); + String str = new String(v.array()); + System.out.println(str); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/Attributes.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,9 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core; + +import java.nio.ByteBuffer; + +public interface Attributes +{ + public ByteBuffer get(String key); + public String getString(String key); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/AttributesContainer.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,6 @@ +//package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core; +// +//public interface AttributesContainer +//{ +// public Attributes getAttributes(); +//}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/Children.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,11 @@ +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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public interface Children extends Iterable<TreeNode> +{ + public Either<Error,TreeNode> at(int pos); + public int size(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/list/DefaultNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,70 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.list; + + +public class DefaultNode<T> implements Node<T> { + private final T attribute; + private final Node<T> next; + + public DefaultNode(T attribute, Node<T> next) { + this.attribute = attribute; + this.next = next; + } + + + public Node<T> getNext() { + return next; + } + + public T getAttribute() { + return attribute; + } + + public Node<T> addLast(T attribute) { + Node<T> node = next.addLast(attribute); + return new DefaultNode<>(this.attribute, node); + } + + public Node<T> add(int currentNum, int num, T attribute) { + if (currentNum == num) { + Node<T> newNode = new DefaultNode<>(attribute, this.next); + return new DefaultNode<>(this.attribute, newNode); + } + + Node<T> newNode = next.add(currentNum + 1, num, attribute); + if (newNode == null) + return null; + + return new DefaultNode<>(this.attribute, newNode); + } + + @Override + public Node<T> delete(int currentNum, int deleteNum) { + if (currentNum == deleteNum) { + return new DefaultNode<>(this.attribute, this.next.getNext()); + } + + Node<T> newNode = next.delete(currentNum + 1, deleteNum); + if (newNode == null) + return null; + + return new DefaultNode<>(this.attribute, newNode); + } + + @Override + public Node<T> replaceNode(int currentNum, int num, T attribute) { + if (currentNum == num) { + return new DefaultNode<>(attribute, this.getNext()); + } + + Node<T> newNode = next.replaceNode(currentNum + 1, num, attribute); + if (newNode == null) + return null; + + return new DefaultNode<>(this.attribute, newNode); + } + + @Override + public int length() { + return next.length() + 1; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/list/List.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,158 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.list; + +import java.util.Iterator; +import java.util.Stack; + + + +public class List<T> implements Iterable<T> { + final private Node<T> head; + + public List() { + this.head = new headNode<>(); + } + + + @SafeVarargs + public List(T... attributes) { + List<T> list = new List<>(); + for (T attribute : attributes) { + list = list.addLast(attribute); + } + this.head = list.getHead(); + } + + private List(Node<T> head) { + this.head = head; + } + + public Node<T> getHead() { + return head; + } + + public List<T> add(int num, T attribute) { + Node<T> newHead = head.add(0, num, attribute); + if (newHead == null) + return this; + return new List<>(newHead); + } + + public List<T> addLast(T attribute) { + Node<T> newHead = head.addLast(attribute); + return new List<>(newHead); + } + + + public T index(int num) { + int count = 0; + Node<T> currentNode = head.getNext(); + while (currentNode != null) { + if (count == num) + return currentNode.getAttribute(); + currentNode = currentNode.getNext(); + count++; + } + return null; + } + + public Iterator<T> iterator() { + return new Iterator<T>() { + Node<T> currentNode = head.getNext(); + + @Override + public boolean hasNext() { + return currentNode.getAttribute() != null; + } + + @Override + public T next() { + T attribute = currentNode.getAttribute(); + currentNode = currentNode.getNext(); + return attribute; + } + }; + } + + public Iterator<T> reverseIterator() { + Node<T> currentNode = head.getNext(); + Stack<T> stack = new Stack<>(); + while (currentNode.getAttribute() != null) { + stack.push(currentNode.getAttribute()); + currentNode = currentNode.getNext(); + } + return new Iterator<T>() { + + @Override + public boolean hasNext() { + return !stack.isEmpty(); + } + + @Override + public T next() { + return stack.pop(); + } + }; + } + + + public List<T> delete(int num) { + Node<T> newNode = head.delete(0, num); + if (newNode == null) + return this; + return new List<>(newNode); + } + + public List<T> replace(int num, T attribute) { + Node<T> newHead = head.replaceNode(0, num, attribute); + if (newHead == null) + return this; + return new List<>(newHead); + } + + public T tail() { + return index(length() - 1); + } + + public T head() { + return index(0); + } + + public List<T> deleteLast() { + return delete(head.length() - 1); + } + + public List<T> deleteHead() { + return delete(0); + } + + public int length() { + return head.length(); + } + + @Override + public String toString() { + String pathString = "<"; + Iterator<T> iterator = reverseIterator(); + while (true) { + pathString += iterator.next(); + if (iterator.hasNext()) + pathString += ","; + else + break; + } + pathString += ">"; + return pathString; + } + + public List<T> append(List<T> list) { + Iterator<T> iterator = list.iterator(); + List<T> newList = this; + while (iterator.hasNext()) { + T attribute = iterator.next(); + newList = newList.addLast(attribute); + } + return newList; + } + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/list/Node.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,19 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.list; + + +public interface Node<T> { + + public Node<T> getNext(); + + public T getAttribute(); + + public Node<T> add(int currentNum, int num, T attribute); + + public Node<T> addLast(T attribute); + + public Node<T> delete(int currentNum, int num); + + public Node<T> replaceNode(int currentNum, int num, T attribute); + + public int length(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/list/TailNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,39 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.list; + + +public class TailNode<T> implements Node<T> { + @Override + public Node<T> getNext() { + return null; + } + + @Override + public T getAttribute() { + return null; + } + + @Override + public Node<T> add(int currentNum, int num, T attribute) { + return null; + } + + @Override + public Node<T> delete(int CurentNum, int num) { + return null; + } + + @Override + public Node<T> replaceNode(int currentNum, int num, T attribute) { + return null; + } + + @Override + public Node<T> addLast(T attribute) { + return new DefaultNode<>(attribute, this); + } + + @Override + public int length() { + return 0; + } +} \ 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/data/list/headNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,63 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.list; + +public class headNode<T> implements Node<T> { + private final Node<T> next; + + + public headNode() { + this.next = new TailNode<>(); + } + + public headNode(Node<T> next) { + this.next = next; + } + + public Node<T> getNext() { + return next; + } + + public T getAttribute() { + return null; + } + + public Node<T> add(int currentNum, int num, T attribute) { + if (num == 0) { + Node<T> newNode = new DefaultNode<>(attribute, next); + return new headNode<>(newNode); + } + Node<T> newNode = next.add(currentNum + 1, num, attribute); + if (newNode == null) + return this; + return new headNode<>(newNode); + } + + public Node<T> addLast(T attribute) { + Node<T> node = next.addLast(attribute); + return new headNode<>(node); + } + + public Node<T> delete(int currentNum, int deleteNum) { + if (currentNum == deleteNum) { + return new headNode<>(this.next.getNext()); + } + + Node<T> newNode = next.delete(currentNum + 1, deleteNum); + if (newNode == null) + return this; + return new headNode<>(newNode); + } + + @Override + public Node<T> replaceNode(int currentNum, int num, T attribute) { + Node<T> nextNode = getNext(); + Node<T> newNode = nextNode.replaceNode(currentNum, num, attribute); + if (newNode == null) + return this; + return new headNode<>(newNode); + } + + @Override + public int length() { + return next.length(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/BlackNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,131 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +import org.junit.Test; + +import java.util.Comparator; + + +public class BlackNode<K, V> extends Node<K, V> { + + + public BlackNode(K key, V value, Node<K, V> left, Node<K, V> right) { + super(key, value, left, right); + } + + + @Override + public rebuildNode deleteNode() { + EmptyNode<K, V> emptyNode = new EmptyNode<>(key); + return new rebuildNode<>(true, emptyNode); + } + + @Override + @Test + protected int checkDepth(int count, int minCount) { // test method + count++; + minCount = left().checkDepth(count, minCount); + minCount = right().checkDepth(count, minCount); + return minCount; + } + + + @Override + protected boolean isNotEmpty() { + return true; + } + + @Override + public Node<K, V> createNode(K key, V value, Node<K, V> left, Node<K, V> right) { + return new BlackNode<>(key, value, left, right); + } + + + @Override + Node<K, V> insBalance() { + Rotate spin = left.checkRotate(Rotate.L); + + if (spin == Rotate.R) { + Node<K, V> leftChild = new BlackNode<>(left.left().getKey(), left.left().getValue(), left.left().left(), left.left().right()); + Node<K, V> rightChild = new BlackNode<>(getKey(), getValue(), left.right(), right); + return new RedNode<>(left.getKey(), left.getValue(), leftChild, rightChild); + + } else if (spin == Rotate.LR) { + Node<K, V> leftChild = new BlackNode<>(left.getKey(), left.getValue(), left.left(), left.right().left()); + Node<K, V> rightChild = new BlackNode<>(getKey(), getValue(), left.right().right(), right); + return new RedNode<>(left.right().getKey(), left.right().getValue(), leftChild, rightChild); + + } + + spin = right.checkRotate(Rotate.R); + if (spin == Rotate.L) { + Node<K, V> leftChild = new BlackNode<>(getKey(), getValue(), left, right.left()); + Node<K, V> rightChild = new BlackNode<>(right.right().getKey(), right.right().getValue(), right.right().left(), right.right().right()); + return new RedNode<>(right.getKey(), right.getValue(), leftChild, rightChild); + + } else if (spin == Rotate.RL) { + Node<K, V> leftChild = new BlackNode<>(getKey(), getValue(), left, right.left().left()); + Node<K, V> rightChild = new BlackNode<>(right.getKey(), right.getValue(), right.left().right(), right.right()); + return new RedNode<>(right.left().getKey(), right.left().getValue(), leftChild, rightChild); + + } + + return this; + } + + + @Override + Rotate checkRotate(Rotate side) { + return Rotate.N; + } + + @Override + boolean isRed() { + return false; + } + + @Override + @SuppressWarnings("unchecked") + public rebuildNode replaceNode(Node<K, V> parent, Comparator ctr) { + Node<K, V> newNode; + if (!this.left().isNotEmpty() && !this.right().isNotEmpty()) { //自身を削除する + return deleteNode();//黒が1つ減るので木のバランスを取る + } else if (this.left().isNotEmpty() && !this.right().isNotEmpty()) { //左の部分木を昇格させる + newNode = createNode(left().getKey(), left().getValue(), left().left(), left().right()); + if (!this.left().isRed()) //昇格させる木のrootが黒だったらバランスを取る + return new rebuildNode(true, newNode); + return new rebuildNode(false, newNode); + } else if (!this.left().isNotEmpty() && this.right().isNotEmpty()) { //右の部分木を昇格させる + newNode = createNode(right().getKey(), right().getValue(), right().left(), right().right()); + if (!this.right().isRed()) //昇格させる木のrootが黒だったらバランスを取る + return new rebuildNode(true, newNode); + return new rebuildNode(false, newNode); + } else {//子ノードが左右にある場合 二回目はここには入らない + //左の部分木の最大の値を持つNodeと自身を置き換える + Node<K, V> cur = this.left(); + while (cur.right().isNotEmpty()) { //左の部分期の最大値を持つNodeを取得する + cur = cur.right(); + } + if (this.left().right().isNotEmpty()) { //左の部分木が右の子を持っているか + rebuildNode<K, V> leftSubTreeNodeRebuildNode = this.left().deleteSubTreeMaxNode(null, ctr, Rotate.L);//最大値を削除した左の部分木を返す。rootはthisと同じ。 + if (leftSubTreeNodeRebuildNode.rebuild()) { + Node<K, V> leftSubTreeNode = leftSubTreeNodeRebuildNode.getNode(); + Node<K, V> newParent = createNode(cur.getKey(), cur.getValue(), leftSubTreeNode, this.right()); + return leftSubTreeNode.deleteBalance(newParent, ctr); + } + Node<K, V> leftSubTreeNode = leftSubTreeNodeRebuildNode.getNode(); + newNode = createNode(cur.getKey(), cur.getValue(), leftSubTreeNode, this.right()); //rootをcurと入れ替えることでNodeの削除は完了する + return new rebuildNode(false, newNode); + } else { + rebuildNode<K, V> leftSubTreeNodeRebuildNode = this.left().replaceNode(this, ctr);//右の子がいなかった場合、左の子を昇格させるだけで良い。 + if (leftSubTreeNodeRebuildNode.rebuild()) { + Node<K, V> node = leftSubTreeNodeRebuildNode.getNode(); + Node<K, V> newParent = createNode(this.left().getKey(), this.left().getValue(), node, this.right()); + return node.deleteBalance(newParent, ctr); + } + Node<K,V> leftSubTreeNode = leftSubTreeNodeRebuildNode.getNode(); + newNode = createNode(this.left().getKey(), this.left().getValue(), leftSubTreeNode, this.right()); + return new rebuildNode(false, newNode); + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/DefaultComparator.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,11 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +import java.util.Comparator; + +public class DefaultComparator<K> implements Comparator<K>{ + @Override + @SuppressWarnings("unchecked") + public int compare(K key, K compareKey) { + return ((Comparable<? super K>)key).compareTo(compareKey); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/EmptyNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,82 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Comparator; + + +public class EmptyNode<K, V> extends Node<K, V> { + + public EmptyNode() { + super(null, null); + } + + public EmptyNode(K key) { //keyは削除時の回転処理に使用する + super(key, null); + } + + @Override // 回転処理時にEmptyNodeの子を見ることがあるのでleft rightでEmptyNodeを返すようにする + public Node<K, V> left() { + return new EmptyNode<>(); + } + + @Override + public Node<K, V> right() { + return new EmptyNode<>(); + } + + + @Override + protected boolean isNotEmpty() { + return false; + } + + + @Override + public Node<K, V> createNode(K key, V value, Node<K, V> left, Node<K, V> right) { + return new RedNode<>(key, value, new EmptyNode<>(), new EmptyNode<>()); + } + + + public Node<K, V> put(K k, V value) { + return new RedNode<>(k, value, new EmptyNode<>(), new EmptyNode<>()); + } + + @Override + public rebuildNode<K, V> replaceNode(Node<K, V> parent, Comparator ctr) { // not use method + return new rebuildNode<>(false, this); + } + + @Override + protected rebuildNode<K, V> deleteNode() { //not use method + return new rebuildNode<>(false, this); + } + + @Override + Node<K, V> insBalance() { + return this; + } + + @Override + Rotate checkRotate(Rotate side) { + return Rotate.N; + } + + @Override + boolean isRed() { + return false; + } + + @Override + @Test + protected int checkDepth(int count, int minCount) { // test method + if (count < minCount | minCount == 0) + minCount = count; + System.out.println("depth = " + count); + + Assert.assertTrue(count <= 2 * minCount); + return minCount; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/Node.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,309 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +import org.junit.Test; + +import java.util.Comparator; +import java.util.Optional; + + +public abstract class Node<K, V> { + + protected K key; + protected V value; + protected Node<K, V> right; + protected Node<K, V> left; + + public Node(K key, V value) { + this.key = key; + this.value = value; + } + + public Node(K key, V value, Node<K, V> left, Node<K, V> right) { + this.key = key; + this.value = value; + this.right = right; + this.left = left; + } + + public Node<K, V> left() { + return left; + } + + @SuppressWarnings("unchecked") + public int compare(K compareKey, Comparator ctr) { + return ctr.compare(compareKey, this.getKey()); + } + + public Optional<V> get(K key, Comparator ctr) { + Node<K, V> cur = this; + while (cur.isNotEmpty()) { + int result = cur.compare(key, ctr); + if (result > 0) + cur = cur.right(); + else if (result < 0) + cur = cur.left(); + else if (result == 0) + return Optional.ofNullable(cur.getValue()); + } + return Optional.ofNullable(null); + } + + + public Node<K, V> right() { + return right; + } + + public K getKey() { + return key; + } + + public V getValue() { + return value; + } + + + public Node<K, V> put(K k, V value, Comparator ctr) { + if (!isNotEmpty()) { + return createNode(k, value, left, right); + } + int result = compare(k, ctr); + if (result > 0) { + Node<K, V> node = right.put(k, value, ctr); + node = createNode(key, this.value, left, node); + return node.insBalance(); + } else if (result < 0) { + Node<K, V> node = left.put(k, value, ctr); + return createNode(key, this.value, node, right).insBalance(); + } + return createNode(key, value, left, right); // equals + + } + + @SuppressWarnings("unchecked") + public rebuildNode delete(K key, Node<K, V> parent, Comparator ctr, Rotate side) { + if (this.isNotEmpty()) { + rebuildNode rebuildNode; + int result = compare(key, ctr); + if (result > 0) { + rebuildNode = right.delete(key, this, ctr, Rotate.R); + } else if (result < 0) { + rebuildNode = left.delete(key, this, ctr, Rotate.L); + } else { //Equal + rebuildNode = replaceNode(parent, ctr); + } + if (parent == null) + return rebuildNode; + Node<K, V> node = rebuildNode.getNode(); + if (rebuildNode.rebuild()) { + return node.deleteBalance(parent, ctr); + } + + Node<K, V> newParent; + if (side == Rotate.L) + newParent = parent.createNode(parent.getKey(), parent.getValue(), node, parent.right()); + else + newParent = parent.createNode(parent.getKey(), parent.getValue(), parent.left(), node); + + return new rebuildNode<>(false, newParent); + } + return null; + } + + @SuppressWarnings("unchecked") + public rebuildNode deleteSubTreeMaxNode(Node<K, V> parent, Comparator ctr, Rotate side) { + rebuildNode rebuildNode; + Node<K, V> node; + if (right().isNotEmpty()) {//最大値のノードが取得できるまで潜る + rebuildNode = right().deleteSubTreeMaxNode(this, ctr, Rotate.R); + } else { + rebuildNode = this.replaceNode(parent, ctr); + } + if (parent == null) + return rebuildNode; + + if (rebuildNode.rebuild()) { + node = rebuildNode.getNode(); + return node.deleteBalance(parent, ctr); + } + if (side == Rotate.R) + node = parent.createNode(parent.getKey(), parent.getValue(), parent.left(), rebuildNode.getNode()); + else + node = parent.createNode(parent.getKey(), parent.getValue(), rebuildNode.getNode(), parent.right()); + return new rebuildNode<>(false, node); + } + + public rebuildNode<K, V> deleteBalance(Node<K, V> parent, Comparator ctr) { + Node<K, V> newNode = null; + if (!isRed()) { + if (0 > compare(parent.getKey(), ctr)) { //自身がどちらの子かを調べる + boolean rightChild = parent.left().right().isRed(); + boolean leftChild = parent.left().left().isRed(); + + if (!parent.isRed()) { //親が黒 + if (!parent.left().isRed()) { //左の子が黒 + if (!rightChild && !leftChild) { + newNode = rebuildThree(parent, Rotate.R); + return new rebuildNode<>(true, newNode); + } + if (rightChild) { + newNode = rebuildfive(parent, Rotate.R); + return new rebuildNode<>(false, newNode); + } else { + newNode = rebuildsix(parent, Rotate.R); + return new rebuildNode<>(false, newNode); + } + } else { //左の子が赤 + newNode = rebuildTwo(parent, ctr, Rotate.R); + return new rebuildNode<>(false, newNode); + } + } else { //親が赤 + if (!rightChild && !leftChild) { + newNode = rebuildFour(parent, Rotate.R); + return new rebuildNode<>(false, newNode); + } + if (rightChild) { + newNode = rebuildfive(parent, Rotate.R); + return new rebuildNode<>(false, newNode); + } else { + newNode = rebuildsix(parent, Rotate.R); + return new rebuildNode<>(false, newNode); + } + } + } else { + boolean rightChild = parent.right().right().isRed(); + boolean leftChild = parent.right().left().isRed(); + + if (!parent.isRed()) { //親が黒 + if (!parent.right().isRed()) { //左の子が黒 + if (!rightChild && !leftChild) { + newNode = rebuildThree(parent, Rotate.L); + return new rebuildNode<>(true, newNode); + } + if (rightChild) { + newNode = rebuildsix(parent, Rotate.L); + return new rebuildNode<>(false, newNode); + } else { + newNode = rebuildfive(parent, Rotate.L); + return new rebuildNode<>(false, newNode); + } + } else { //左の子が赤 + newNode = rebuildTwo(parent, ctr, Rotate.L); + return new rebuildNode<>(false, newNode); + } + } else { //親が赤 + if (!rightChild && !leftChild) { + newNode = rebuildFour(parent, Rotate.L); + return new rebuildNode<>(false, newNode); + } + if (rightChild) { + newNode = rebuildsix(parent, Rotate.L); + return new rebuildNode<>(false, newNode); + } else { + newNode = rebuildfive(parent, Rotate.L); + return new rebuildNode<>(false, newNode); + } + } + } + } + if (0 > (compare(parent.getKey(), ctr))) { + newNode = parent.createNode(parent.getKey(), parent.getValue(), parent.left(), this); + return new rebuildNode<>(false, newNode); + } else { + newNode = parent.createNode(parent.getKey(), parent.getValue(), this, parent.right()); + return new rebuildNode<>(false, newNode); + } + } + + protected Node<K, V> rebuildTwo(Node<K, V> parent, Comparator ctr, Rotate side) { // case2 + if (side == Rotate.L) { // rotate Left + Node<K, V> node = parent.right(); + Node<K, V> leftSubTreeRoot = node.createNode(parent.getKey(), parent.getValue(), this, node.left()); // check + rebuildNode<K, V> rebuildNode = new rebuildNode<>(false, leftSubTreeRoot); + rebuildNode<K, V> leftNodeRebuildNode = this.deleteBalance(rebuildNode.getNode(), ctr); + Node<K, V> rightNode = node.right(); + return parent.createNode(node.getKey(), node.getValue(), leftNodeRebuildNode.getNode(), rightNode); + } else { // rotate Right + Node<K, V> node = parent.left(); + Node<K, V> rightSubTreeRoot = node.createNode(parent.getKey(), parent.getValue(), node.right(), this); + rebuildNode<K, V> rightSubTreeRebuildNode = new rebuildNode<>(false, rightSubTreeRoot); + rebuildNode<K, V> rightNodeRebuildNode = this.deleteBalance(rightSubTreeRebuildNode.getNode(), ctr); + Node<K, V> leftNode = node.left(); + return parent.createNode(node.getKey(), node.getValue(), leftNode, rightNodeRebuildNode.getNode()); + } + } + + protected Node<K, V> rebuildThree(Node<K, V> parent, Rotate side) { // case3 再帰 + if (side == Rotate.L) { + Node<K, V> rightNode; + if (parent.right().isNotEmpty()) + rightNode = new RedNode<>(parent.right().getKey(), parent.right().getValue(), parent.right().left(), parent.right().right()); // check + else + rightNode = new EmptyNode<>(); + return parent.createNode(parent.getKey(), parent.getValue(), this, rightNode); + } else { + Node<K, V> leftNode; + if (parent.left().isNotEmpty()) + leftNode = new RedNode<>(parent.left().getKey(), parent.left().getValue(), parent.left().left(), parent.left().right()); // check + else + leftNode = new EmptyNode<>(); + return parent.createNode(parent.getKey(), parent.getValue(), leftNode, this); + } + } + + protected Node<K, V> rebuildFour(Node<K, V> parent, Rotate side) { //case 4 + if (side == Rotate.R) { + Node<K, V> leftNode = new RedNode<>(parent.left().getKey(), parent.left().getValue(), parent.left().left(), parent.left().right()); + return new BlackNode<>(parent.getKey(), parent.getValue(), leftNode, this); + } else { + Node<K, V> rightNode = new RedNode<>(parent.right().getKey(), parent.right().getValue(), parent.right().left(), parent.right().right()); + return new BlackNode<>(parent.getKey(), parent.getValue(), this, rightNode); + } + } + + protected Node<K, V> rebuildfive(Node<K, V> parent, Rotate side) { //case5 + if (side == Rotate.R) { // rotate Left + Node<K, V> leftChild = new RedNode<>(parent.left().getKey(), parent.left().getValue(), parent.left().left(), parent.left().right().left()); + Node<K, V> rightChild = parent.left().right().right(); + Node<K, V> leftSubTreeRoot = new BlackNode<>(parent.left().right().getKey(), parent.left().right().getValue(), leftChild, rightChild); + Node<K, V> newParent = parent.createNode(parent.getKey(), parent.getValue(), leftSubTreeRoot, this); + return this.rebuildsix(newParent, Rotate.R); + } else { // rotate Right 修正済み + Node<K, V> leftChild = parent.right().left().left(); + Node<K, V> rightChild = new RedNode<>(parent.right().getKey(), parent.right().getValue(), parent.right().left().right(), parent.right().right()); + Node<K, V> rightSubTreeRoot = new BlackNode<>(parent.right().left().getKey(), parent.right().left().getValue(), leftChild, rightChild); + Node<K, V> newParent = parent.createNode(parent.getKey(), parent.getValue(), this, rightSubTreeRoot); + return this.rebuildsix(newParent, Rotate.L); + } + } + + protected Node<K, V> rebuildsix(Node<K, V> parent, Rotate side) { //case6 + if (side == Rotate.L) { // rotate Left + Node<K, V> leftChild = parent.right().createNode(parent.getKey(), parent.getValue(), this, parent.right().left()); //check + Node<K, V> rightChild = new BlackNode<>(parent.right().right().getKey(), parent.right().right().getValue(), parent.right().right().left(), parent.right().right().right()); + return parent.createNode(parent.right().getKey(), parent.right().getValue(), leftChild, rightChild); + } else { // rotate Right + Node<K, V> leftChild = new BlackNode<>(parent.left().left().getKey(), parent.left().left().getValue(), parent.left().left().left(), parent.left().left().right()); + Node<K, V> rightChild = parent.left().createNode(parent.getKey(), parent.getValue(), parent.left().right(), this); + return parent.createNode(parent.left().getKey(), parent.left().getValue(), leftChild, rightChild); + } + } + + + protected abstract boolean isNotEmpty(); + + public abstract Node<K, V> createNode(K key, V value, Node<K, V> left, Node<K, V> right); + + abstract Node<K, V> insBalance(); + + abstract Rotate checkRotate(Rotate side); + + abstract boolean isRed(); + + public abstract rebuildNode replaceNode(Node<K, V> parent, Comparator ctr); + + protected abstract rebuildNode deleteNode(); + + @Test + // test method + protected abstract int checkDepth(int count, int minCount); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/RedNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,112 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +import org.junit.Test; + +import java.util.Comparator; + + +public class RedNode<K, V> extends Node<K, V> { + + + public RedNode(K key, V value, Node<K, V> left, Node<K, V> right) { + super(key, value, left, right); + } + + + @Override + protected boolean isNotEmpty() { + return true; + } + + @Override + public Node<K, V> createNode(K key, V value, Node<K, V> left, Node<K, V> right) { + return new RedNode<>(key, value, left, right); + } + + @Override + protected Node<K, V> insBalance() { + return this; + } + + @Override + protected rebuildNode deleteNode() { + Node emptyNode = new EmptyNode<>(this.getKey()); + return new rebuildNode(false, emptyNode); + } + + @Override + Rotate checkRotate(Rotate side) { + if (side == Rotate.L) { + if (left.isRed()) + return Rotate.R; + else if (right.isRed()) + return Rotate.LR; + return Rotate.N; + } else { + if (left.isRed()) + return Rotate.RL; + else if (right.isRed()) + return Rotate.L; + return Rotate.N; + } + } + + @Override + boolean isRed() { + return true; + } + + @SuppressWarnings("unchecked") + @Override + public rebuildNode replaceNode(Node<K, V> parent, Comparator ctr) { + Node<K, V> newNode; + if (!this.left().isNotEmpty() && !this.right().isNotEmpty()) { //自身を削除する + return deleteNode(); + } else if (this.left().isNotEmpty() && !this.right().isNotEmpty()) { //左の部分木を昇格させる + newNode = left().createNode(left().getKey(), left().getValue(), left().left(), left().right()); + return new rebuildNode(false, newNode); + } else if (!this.left().isNotEmpty() && this.right().isNotEmpty()) { //右の部分木を昇格させる + newNode = right().createNode(right().getKey(), right().getValue(), right().left(), right().right()); + return new rebuildNode(false, newNode); + } else {//子ノードが左右にある場合 + //左の部分木の最大の値を持つNodeと自身を置き換える + Node<K, V> cur = this.left(); + + while (cur.right().isNotEmpty()) { + cur = cur.right(); + } + if (this.left().right().isNotEmpty()) { + rebuildNode<K, V> leftSubTreeNodeRebuildNode = this.left().deleteSubTreeMaxNode(null, ctr, Rotate.L); + if (leftSubTreeNodeRebuildNode.rebuild()) { + Node<K, V> node = leftSubTreeNodeRebuildNode.getNode(); + Node<K, V> newParent = createNode(cur.getKey(), cur.getValue(), node, this.right()); + return node.deleteBalance(newParent, ctr); + } + Node<K, V> leftSubTreeNode = leftSubTreeNodeRebuildNode.getNode(); + newNode = createNode(cur.getKey(), cur.getValue(), leftSubTreeNode, this.right()); + return new rebuildNode<>(false, newNode); + } else { + rebuildNode<K, V> leftSubTreeNodeRebuildNode = this.left().replaceNode(this, ctr); + if (leftSubTreeNodeRebuildNode.rebuild()) { + Node<K, V> node = leftSubTreeNodeRebuildNode.getNode(); + Node<K, V> newParent = createNode(this.left().getKey(), this.left().getValue(), node, this.right()); + return node.deleteBalance(newParent, ctr); + } + Node<K, V> leftSubTreeNode = leftSubTreeNodeRebuildNode.getNode(); + newNode = createNode(cur.getKey(), cur.getValue(), leftSubTreeNode, this.right()); + return new rebuildNode<>(false, newNode); + } + + } + } + + + @Override + @Test + protected int checkDepth(int count, int minCount) { // test method + count++; + minCount = left().checkDepth(count, minCount); + minCount = right().checkDepth(count, minCount); + return minCount; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/Rotate.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,5 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +public enum Rotate { + R, L, RL, LR, N +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/RotateParent.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,16 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + +/** + * Generic Exception not support + **/ +public class RotateParent extends Exception { + + Node parent; + public RotateParent(Node node) { + this.parent = node; + } + + public Node getParent() { + return parent; + } +} \ 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/data/treemap/TreeMap.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,110 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + + +import org.junit.Test; + +import java.util.Comparator; +import java.util.Iterator; +import java.util.Optional; +import java.util.Stack; + + +public class TreeMap<K, V> { + final Node<K, V> root; + final Comparator comparator; + + public TreeMap() { + this.root = new EmptyNode<>(); + this.comparator = new DefaultComparator<K>(); + } + + public TreeMap(Comparator comparator) { + this.root = new EmptyNode<>(); + this.comparator = comparator; + } + + public TreeMap(Node<K, V> root, Comparator comparator) { + this.root = root; + this.comparator = comparator; + } + + public Node getRoot() { + return root; + } + + public Optional<V> get(final K key) { + return root.get(key, this.comparator); + } + + public TreeMap<K, V> put(K key, V value) { + if (isEmpty()) { + Node<K, V> newRoot = new BlackNode<>(key, value, new EmptyNode<>(), new EmptyNode<>()); + return new TreeMap<>(newRoot, this.comparator); + } + Node<K, V> newEntry = root.put(key, value, this.comparator); + Node<K, V> newRoot = new BlackNode<>(newEntry.getKey(), newEntry.getValue(), newEntry.left(), newEntry.right()); + return new TreeMap<>(newRoot, this.comparator); + } + + + public boolean isEmpty() { + return !root.isNotEmpty(); + } + + + public TreeMap<K, V> delete(K key) { + if (key == null) + return this; + rebuildNode<K,V> rootRebuildNode = root.delete(key, null, comparator, Rotate.N); + if (!rootRebuildNode.notEmpty()) + return this; // not key + Node<K,V> root = rootRebuildNode.getNode(); + if (!root.isNotEmpty()) + return new TreeMap<>(new EmptyNode<>(), this.comparator); + Node<K, V> newRoot = new BlackNode<>(root.getKey(), root.getValue(), root.left(), root.right()); + return new TreeMap<>(newRoot, this.comparator); + } + + public Iterator<K> keys() { + return new Iterator<K>() { + Stack<Node<K, V>> nodeStack = new Stack<>(); + Node<K, V> currentNode = root; + + @Override + public boolean hasNext() { + return currentNode != null; + } + + @Override + public K next() { + K key = currentNode.getKey(); + + if (currentNode.left().isNotEmpty()) { + nodeStack.push(currentNode); + currentNode = currentNode.left(); + return key; + } else if (currentNode.right().isNotEmpty()) { + currentNode = currentNode.right(); + return key; + } else if (nodeStack.isEmpty()) { + currentNode = null; + return key; + } + + do { + currentNode = nodeStack.pop().right(); + if (currentNode.isNotEmpty()) + return key; + + } while (!nodeStack.isEmpty()); + return key; + } + }; + } + + @Test + public void checkDepth() { + root.checkDepth(0, 0); + System.out.println("-----------------------------------"); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/treemap/rebuildNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,24 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.data.treemap; + + +public class rebuildNode<K,V> { + private final Boolean rebuild; + private final Node<K,V> node; + + public rebuildNode(Boolean l, Node<K, V> node){ + this.rebuild = l; + this.node = node; + } + + public boolean rebuild(){ + return rebuild; + } + + public Node<K,V> getNode(){ + return node; + } + + public Boolean notEmpty(){ + return node != null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/error/BasicErrors.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,10 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.error; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; + +public class BasicErrors +{ + public static final jp.ac.u_ryukyu.ie.cr.jungle.util.Error NULL_VALUE_NOT_ALLOWED = new DefaultError(); + public static final Error INDEX_OUT_OF_BOUNDS = new DefaultError(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/ChangeList.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,11 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.TreeOperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; + +public interface ChangeList extends Iterable<TreeOperation> +{ + public String uuid(); + public String getTreeName(); + public TreeOperationLog getLog(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/ChangeListReader.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,8 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +public interface ChangeListReader extends Iterable<ChangeList> +{ + public ChangeListReader newReader(); + public ChangeList read(); + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/ChangeListWriter.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,6 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +public interface ChangeListWriter +{ + public Result write(ChangeList operations); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultChangeListReader.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,46 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; + +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.util.Iterator; +import java.util.LinkedList; + +// not thread safe +public class DefaultChangeListReader implements ChangeListReader { + private long pos; + private ByteBuffer buf; + private FileChannel ch; + + DefaultChangeListReader(FileChannel ch, ByteBuffer buf, long pos) { + this.pos = pos; + this.buf = buf; + this.ch = ch; + } + + @Override + public ChangeListReader newReader() { + ByteBuffer readByteBuffer = buf.asReadOnlyBuffer(); + return new DefaultChangeListReader(ch, readByteBuffer, pos); + } + + @Override + public ChangeList read() { + LinkedList<TreeOperation> list = new LinkedList<TreeOperation>(); + + int size = buf.getInt(); + if (size == 0) { + + } + + return null; + } + + @Override + public Iterator<ChangeList> iterator() { + return null; + } + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultChangeListWriter.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,29 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +import java.nio.ByteBuffer; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; + +public class DefaultChangeListWriter implements ChangeListWriter +{ + public DefaultChangeListWriter(ByteBuffer buf) + { + + } + + @Override + public synchronized Result write(ChangeList operations) + { + for(TreeOperation op : operations){ + ByteBuffer treeOpBuf = serializeTreeOperation(op); + } + return null; + } + + private ByteBuffer serializeTreeOperation(TreeOperation op) + { + + return null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultJournal.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,114 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.nio.ByteBuffer; +import java.nio.MappedByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.channels.FileChannel.MapMode; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +/* + * text based journal. + * + * non terminal symbols + * + * JOURNAL => CHANGELISTS + * CHANGE_LISTS => CHANGE_LIST | CHANGE_LISTS + * CHANGE_LISTS => *EMPTY* + * + * CHANGE_LIST => OPERATIONS + * OPERATIONS => OPERATION CR | OPERATIONS + * OPERATIONS => *EMPTY* + + * OPERATION => APPEND_CHILD | DELETE_CHILD | PUT_ATTRIBUTE | DELETE_ATTRIBUTE | COMMIT + * APPEND_CHILD => APPEND_CHILD_ID NODE_PATH INSERT_POSITION + * DELETE_CHILD => DELETE_CHILD_ID NODE_PATH DELETE_POSITION + * PUT_ATTRIBUTE => PUT_ATTRIBUTE_ID NODE_PATH KEY VALUE + * DELETE_ATTRIBUTE => DELTE_ATTRIBUTE_ID NODE_PATH KEY + * COMMIT => COMMIT_ID + * + * NODE_PATH => POSITION "." NODE_PATH | POSITION + * + * terminal symbols + * + * APPEND_CHILD_ID = "APPEND_CHILD" + * DELETE_CHILD_ID = "DELETE_CHILD" + * PUT_ATTRIBUTE_ID = "PUT_ATTRIBUTE" + * SET_ATTRIBUTE_ID = "SET_ATTRIBUTE" + * COMMIT_ID => "COMMIT" + * CR => \n + * INSERT_POSITION => INTEGER + * DELETE_POSITION => INTEGER + * KEY => "*" + * VALUE => "*" + * + */ + +public class DefaultJournal implements Journal +{ + private final ChangeListWriter writer; + + public static void main(String args[]) throws Exception + { + RandomAccessFile f = new RandomAccessFile("./miscs/1.dat","rw"); + MappedByteBuffer a = f.getChannel().map(MapMode.READ_WRITE,10,10); + MappedByteBuffer b = f.getChannel().map(MapMode.READ_WRITE,10,10); + MappedByteBuffer c = f.getChannel().map(MapMode.READ_WRITE,20,10); + + a.putInt(5); + System.out.println(b.getInt()); + c.putInt(2); + a.force(); + b.force(); + c.force(); + + System.out.println(b.capacity()); + MappedByteBuffer d = f.getChannel().map(MapMode.READ_WRITE,50,10); + d.putInt(2); + d.force(); + System.out.println(d.getInt()); + } + + public static final int READ_BUFFER_SIZE = 1000000; // 1MB + public static final int WRITE_BUFFER_SIZE = 1000000; // 1MB + + private DefaultJournal() + { + writer = null; + } + + public static Either<Error,DefaultJournal> newInstance(String fileName) + { + RandomAccessFile journal = null; + try{ + journal = new RandomAccessFile(fileName,"rw"); + FileChannel ch = journal.getChannel(); + long length = journal.length(); + ByteBuffer readBuf = ch.map(MapMode.READ_ONLY,0,READ_BUFFER_SIZE); + ByteBuffer writeBuf = ch.map(MapMode.READ_WRITE,length,WRITE_BUFFER_SIZE); + + }catch(FileNotFoundException _e){ + _e.printStackTrace(); + return null; // should return Error here. + }catch(IOException _e){ + _e.printStackTrace(); + } + return null; + } + + @Override + public ChangeListReader getReader() + { + return null; + } + + @Override + public ChangeListWriter getWriter() + { + return writer; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/DefaultJournalWriter.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,31 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public class DefaultJournalWriter +{ + public DefaultJournalWriter(String _fileName) + { + + } + + public static Either<Error,DefaultJournalWriter> newInstance(String fileName) + { + RandomAccessFile journal = null; + try{ + journal = new RandomAccessFile(fileName,"rw"); + //FileChannel ch = journal.getChannel(); + long length = journal.length(); + }catch(FileNotFoundException e){ + + }catch(IOException e){ + + } + + return null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/Journal.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,7 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +public interface Journal +{ + public ChangeListReader getReader(); + public ChangeListWriter getWriter(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/NullJournal.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,82 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + + +import java.util.Iterator; + + + +public class NullJournal implements Journal +{ + private static final NullChangeListWriter NULL_WRITER = new NullChangeListWriter(); + private static final NullChangeListReader NULL_READER = new NullChangeListReader(); + + @Override + public ChangeListReader getReader() + { + return NULL_READER; + } + + @Override + public ChangeListWriter getWriter() + { + return NULL_WRITER; + } + + private static class NullChangeListWriter implements ChangeListWriter + { + @Override + public Result write(ChangeList operations) + { + /* + for(TreeOperation op : _operations){ + NodePath p = op.getNodePath(); + NodeOperation nodeOp = op.getNodeOperation(); + Command c = nodeOp.getCommand(); + String args = ""; + switch(c){ + case PUT_ATTRIBUTE: + String key = nodeOp.getKey(); + ByteBuffer value = nodeOp.getValue(); + if(value.limit() < 100){ + args = String.format("key:%s,value:%s",key,new String(value.array())); + }else{ + args = String.format("key:%s,value:%d",key,value.limit()); + } + break; + case DELETE_ATTRIBUTE: + args = String.format("key:%s",nodeOp.getKey()); + break; + case APPEND_CHILD: + args = String.format("pos:%d",nodeOp.getPosition()); + break; + case DELETE_CHILD: + args = String.format("pos:%d",nodeOp.getPosition()); + break; + } + System.out.println(String.format("[%s:%s:%s]",c,p,args)); + } + */ + return Result.SUCCESS; + } + } + + private static class NullChangeListReader implements ChangeListReader + { + @Override + public ChangeListReader newReader() + { + return this; + } + + @Override + public ChangeList read() + { + return null; + } + + @Override + public Iterator<ChangeList> iterator() { + return null; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/persistent/Result.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,6 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.persistent; + +public class Result +{ + public static Result SUCCESS = new Result(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/query/PathNodeIterator.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,80 @@ +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 java.util.Iterator; +import java.util.Stack; + +public class PathNodeIterator implements Iterator<TreeNode> { + + TreeNode root; + TreeNode node; + int childNumber; + private TreeNodeChildren children; + private Stack<TreeNode> nodeStack = new Stack<>(); + private Stack<Integer> searchStack = new Stack<>(); + + /* + * get queryIndexCondition from query + * if already index exists, use index + * otherwise traverse tree and create index + * + * */ + public PathNodeIterator(TreeNode root) { + this.root = root; + this.node = root; + } + + @Override + public boolean hasNext() { + return node != null; + } + + @Override + public TreeNode next() { + TreeNode now = node; + if (node.getChildren().size() > 0) { + nodeStack.push(node); + children = node.getChildren(); + node = children.at(0).b(); + childNumber = 1; + searchStack.push(childNumber); + } else if (node == root) { + node = null; // no more node + children = null; + return now; + }else if (children != null && children.size() > childNumber) { + childNumber = searchStack.pop(); + node = children.at(childNumber).b(); + searchStack.push(++childNumber); + } else { + node = nodeStack.pop(); + children = node.getChildren(); + childNumber = searchStack.pop(); + for (; children.size() == childNumber;) { + if (node == root) { + node = null; // no more node + children = null; + return now; + } + node = nodeStack.pop(); + children = node.getChildren(); + childNumber = searchStack.pop(); + } + if (node != null && childNumber < children.size()) { + nodeStack.push(node); + node = children.at(childNumber).b(); + searchStack.push(++childNumber); + } + } + return now; + } + + @Override + public void remove() { + // TODO Auto-generated method stub + + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/query/Query.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,7 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.query; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; + +public interface Query { + boolean condition(TreeNode _node); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/Command.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,10 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +public enum Command +{ + APPEND_CHILD, + DELETE_CHILD, + PUT_ATTRIBUTE, + DELETE_ATTRIBUTE, + REPLACE_ROOT; +} \ 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/store/Constants.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,7 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +public class Constants +{ + public static final String DEFAULT_OWNER = "default"; + public static final long DEFAULT_REVISION_START_NUMBER = 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/NodePath.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,12 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; + +public interface NodePath extends Iterable<Integer> +{ + public NodePath add(int pos); + public Pair<Integer,NodePath> pop(); + public NodePath tail(); + public int size(); + public Pair<Integer,NodePath> last(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/NulIterator.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,19 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +import java.util.Iterator; + +public class NulIterator<T> implements Iterator<T> { + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + return false; + } + + @Override + public T next() { + // TODO Auto-generated method stub + return null; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/Transaction.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,9 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public interface Transaction<T> +{ + public Either<Error,T> success(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/TreeContext.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,32 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + + +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.store.operations.TreeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +public interface TreeContext { + public TreeNode getRoot(); + + public TreeContext prev(); + + public ChangeList getChangeList(); + + public String uuid(); + + public String getTreeName(); + + public long revision(); + + public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex(); + + public Iterable<TreeOperation> getOperations(); + + public ParentIndex getParentIndex(); + + public InterfaceTraverser getTraverser(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/TreeEditor.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,12 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +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.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public interface TreeEditor +{ + public Either<Error,LoggingNode> edit(TreeNode root,NodePath path,NodeEditor transformer); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/TreeEditorError.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,9 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; + +public class TreeEditorError +{ + public static final Error NODEPATH_NOTFOUND = new DefaultError(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/DefaultNodePath.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,81 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; + +import java.util.Iterator; + +public class DefaultNodePath implements NodePath { + private final List<Integer> path; + + public static void main(String args[]) { + DefaultNodePath p = new DefaultNodePath(); + p = p.add(1).add(2).add(3).add(4); + System.out.println(p.toString()); + } + + public DefaultNodePath() { + path = new List<Integer>().addLast(-1); + } + + private DefaultNodePath(List<Integer> path) { + this.path = path; + } + + @Override + public Iterator<Integer> iterator() { + return path.iterator(); + } + + @Override + public DefaultNodePath add(int pos) { + List<Integer> newPath = path.addLast(pos); + return new DefaultNodePath(newPath); + } + + @Override + public Pair<Integer, NodePath> pop() { + Integer head = path.head(); + List<Integer> tail = path.deleteHead(); + return new Pair<>(head, new DefaultNodePath(tail)); + } + + @Override + public Pair<Integer, NodePath> last() { + Integer last = path.head(); + List<Integer> list = path.deleteHead(); + return new Pair<>(last, new DefaultNodePath(list)); + } + + @Override + public String toString() { + return path.toString(); + } + + @Override + public int size() { + return path.length(); + } + + + //PATHの一番後ろを取り除いたPATHを新しく作って返す +// EXAMPLE <0,0,3> → <0,0> + @Override + public NodePath tail() { + List<Integer> tail = path.deleteLast(); + return new DefaultNodePath(tail); + } + + public List<DefaultNodePath> inits() { + List<DefaultNodePath> paths = new List<>(); + List<Integer> coursePath = new List<>(); + for (Integer tmpPath : path) { + List<Integer> tmp = coursePath.addLast(tmpPath); + paths = paths.addLast(new DefaultNodePath(tmp)); + coursePath = tmp; + } + return paths; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/DefaultTreeEditor.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,80 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultEvaluator; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Direction; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traversal; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traverser; +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; + +public class DefaultTreeEditor implements TreeEditor +{ + private final Traverser traverser; + public DefaultTreeEditor(Traverser traverser) + { + this.traverser = traverser; + } + + @Override + public Either<Error,LoggingNode> edit(TreeNode root,NodePath path,NodeEditor editor) + { + DefaultEvaluator e = new DefaultEvaluator(path); + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, Traversal> either = traverser.traverse(root,e); + + 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); + } + +} \ 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/store/impl/IndexTreeEditor.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,89 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultEvaluator; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Direction; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traversal; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traverser; +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.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public class IndexTreeEditor { + + private final Traverser traverser; + + + public IndexTreeEditor(Traverser traverser) + { + this.traverser = traverser; + } + + + public Either<Error,LoggingNode> edit(TreeNode root,NodePath path,NodeEditor editor) + { + DefaultEvaluator e = new DefaultEvaluator(path); + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, Traversal> either = traverser.traverse(root,e); + + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + Traversal t = either.b(); + Either<Error,LoggingNode> ret = clone(t,editor); + + return ret; + } + + 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.deleteLast()) { + TreeNode updateTargetNode = parentDirection.getTarget(); + TreeNodeChildren chs = updateTargetNode.getChildren(); + + + + Either<Error, TreeNode> ret = chs.replaceNode(pos, child); + if (ret.isA()) { + return DefaultEither.newA(ret.a()); + } + + TreeNode newParent = ret.b(); + + child = newParent; + pos = parentDirection.getPosition(); + } + + TreeNode newRoot = child; + LoggingNode logNode = editor.wrap(newRoot, newWrap.getOperationLog()); + + + return DefaultEither.newB(logNode); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,15 @@ +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(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNodeAttributes.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,17 @@ +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(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNodeChildren.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,15 @@ +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); + 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/store/impl/logger/DefaultOperationLog.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,43 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; + +import java.util.Iterator; + +public class DefaultOperationLog implements OperationLog +{ + private final List<NodeOperation> log; + + private static final List<NodeOperation> EMPTY =new List<>(); + + public DefaultOperationLog() + { + this(EMPTY); + } + + private DefaultOperationLog(List<NodeOperation> _log) + { + log = _log; + } + + @Override + public Iterator<NodeOperation> iterator() + { + return log.iterator(); + } + + + @Override + public DefaultOperationLog add(NodeOperation _op) + { + return new DefaultOperationLog(log.addLast(_op)); + } + + @Override + public int length() + { + return log.length(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/DefaultTreeOperationLog.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,60 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger; + +import com.google.common.collect.Iterables; +import jp.ac.u_ryukyu.ie.cr.jungle.store.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.data.list.List; + +import java.util.Iterator; + +public class DefaultTreeOperationLog implements TreeOperationLog +{ + private final Iterable<TreeOperation> list; + private final int size; + + public DefaultTreeOperationLog() + { + list = new List<>(); + size = 0; + } + + public DefaultTreeOperationLog(Iterable<TreeOperation> _list,int _size) + { + list = _list; + size = _size; + } + + @Override + public Iterator<TreeOperation> iterator() + { + return list.iterator(); + } + + @Override + public TreeOperationLog add(NodePath _p, NodeOperation _op) + { + TreeOperation op = new DefaultTreeOperation(_p,_op); + List<TreeOperation> newList = new List<>(op); + Iterable<TreeOperation> concat = Iterables.concat(list,newList); + + return new DefaultTreeOperationLog(concat,size + 1); + } + + @Override + public TreeOperationLog append(TreeOperationLog _log) + { + int argumentLogSize = _log.length(); + Iterable<TreeOperation> concat = Iterables.concat(list,_log); + + return new DefaultTreeOperationLog(concat,argumentLogSize + size); + } + + @Override + public int length() + { + return size; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/LoggingAttributes.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,57 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.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; +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 java.nio.ByteBuffer; + +public class LoggingAttributes //implements EditableAttributes +{ + private final TreeNode wrap; + private final OperationLog log; + + public LoggingAttributes(TreeNode _wrap,OperationLog _log) + { + wrap = _wrap; + log = _log; + } + + public ByteBuffer get(String _key) + { + TreeNodeAttributes attributes = wrap.getAttributes(); + return attributes.get(_key); + } + + private Either<Error,LoggingNode> edit(NodeOperation _op) + { + Either<Error,TreeNode> either = _op.invoke(wrap); + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + TreeNode newNode = either.b(); + OperationLog newLog = log.add(_op); + LoggingNode newLogNode = new LoggingNode(newNode,newLog); + + return DefaultEither.newB(newLogNode); + } + + public Either<Error,LoggingNode> delete(final String _key) + { + + DeleteAttributeOperation deleteAttribute = new DeleteAttributeOperation(_key); + return edit(deleteAttribute); + } + + public Either<Error,LoggingNode> put(final String _key,final ByteBuffer _value) + { + PutAttributeOperation putAttribute = new PutAttributeOperation(_key,_value); + return edit(putAttribute); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/LoggingChildren.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,67 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger; + + +import jp.ac.u_ryukyu.ie.cr.jungle.core.Children; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.AppendChildAtOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.DeleteChildAtOperation; +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.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public class LoggingChildren +{ + private final TreeNode wrap; + private final OperationLog log; + + public LoggingChildren(TreeNode _wrap,OperationLog _log) + { + wrap = _wrap; + log = _log; + } + + public int size() + { + Children children = wrap.getChildren(); + return children.size(); + } + + public Either<Error,LoggingNode> edit(NodeOperation _op) + { + Either<Error,TreeNode> either = _op.invoke(wrap); + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + TreeNode newWrap = either.b(); + OperationLog newLog = log.add(_op); + LoggingNode newLoggingNode = new LoggingNode(newWrap,newLog); + return DefaultEither.newB(newLoggingNode); + } + + public Either<Error,LoggingNode> addNewChildAt(final int _pos) + { + NodeOperation addNewChildAt = new AppendChildAtOperation(_pos); + return edit(addNewChildAt); + } + + public Either<Error,LoggingNode> deleteChildAt(final int _pos) + { + NodeOperation deleteChildAt = new DeleteChildAtOperation(_pos); + return edit(deleteChildAt); + } + + public Either<Error,LoggingNode> at(int _pos) + { + Children children = wrap.getChildren(); + Either<Error,TreeNode> either = children.at(_pos); + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + TreeNode node = either.b(); + LoggingNode logNode = new LoggingNode(node); + return DefaultEither.newB(logNode); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/LoggingNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,66 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger; + +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.store.operations.ReplaceRootNodeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + + +public class LoggingNode +{ + + private final TreeNode wrap; + private final OperationLog log; + + public LoggingNode(TreeNode _wrap) + { + this(_wrap,new DefaultOperationLog()); + } + + public LoggingNode(TreeNode _wrap,OperationLog _log) + { + wrap = _wrap; + log = _log; + } + + public LoggingAttributes getAttributes() + { + return new LoggingAttributes(wrap,log); + } + + public LoggingChildren getChildren() + { + return new LoggingChildren(wrap,log); + } + + + public OperationLog getOperationLog() + { + return log; + } + + + public Either<Error, LoggingNode> replaceNewRootNode() { + NodeOperation replaceRootNode = new ReplaceRootNodeOperation(); + return edit(replaceRootNode); + } + + public Either<Error, LoggingNode> edit(NodeOperation op){ + Either<Error,TreeNode> either = op.invoke(wrap); + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + TreeNode newWrap = either.b(); + OperationLog newLog = log.add(op); + LoggingNode newLoggingNode = new LoggingNode(newWrap,newLog); + return DefaultEither.newB(newLoggingNode); + } + + public TreeNode getWrap() + { + return wrap; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/OperationLog.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,10 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; + + +public interface OperationLog extends Iterable<NodeOperation> +{ + public OperationLog add(NodeOperation _op); + public int length(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/logger/TreeOperationLog.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,12 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; + +public interface TreeOperationLog extends Iterable<TreeOperation> +{ + public TreeOperationLog add(NodePath _p,NodeOperation _op); + public TreeOperationLog append(TreeOperationLog _log); + public int length(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/index/IndexCreater.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,117 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.index; + + +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.data.treemap.TreeMap; + +import java.util.Iterator; +import java.util.Optional; +import java.util.Stack; + +public class IndexCreater { + + TreeNode node; + int childNumber; + private TreeNodeChildren children; + ParentIndex parentIndex = new ParentIndex(); + TreeMap<String, TreeMap<String, List<TreeNode>>> indexList = new TreeMap<>(); + + public IndexCreater(TreeNode rootNode) { + Stack<TreeNode> nodeStack = new Stack<>(); + Stack<Integer> searchStack = new Stack<>(); + this.node = rootNode; + while (node != null) { + TreeNode targetNode = node; + Iterator<String> keys = targetNode.getAttributes().getKeys(); + for (; keys.hasNext(); ) { + String key = keys.next(); + String value = targetNode.getAttributes().getString(key); + if (value != null) + indexList = set(key, value, targetNode); + } + if (node.getChildren().size() > 0) { + nodeStack.push(node); + TreeNode parent = node; + children = node.getChildren(); + node = children.at(0).b(); + parentIndex.set(parent, node); + childNumber = 1; + searchStack.push(childNumber); + } else if (node == rootNode) { + node = null; // no more node + children = null; + return; + } else if (children != null && children.size() > childNumber) { + childNumber = searchStack.pop(); + TreeNode parent = nodeStack.pop(); + nodeStack.push(parent); + node = children.at(childNumber).b(); + parentIndex.set(parent, node); + searchStack.push(++childNumber); + } else { + node = nodeStack.pop(); + children = node.getChildren(); + childNumber = searchStack.pop(); + for (; children.size() == childNumber; ) { + if (node == rootNode) { + node = null; // no more node + children = null; + return; + } + node = nodeStack.pop(); + children = node.getChildren(); + childNumber = searchStack.pop(); + } + if (node != null && childNumber < children.size()) { + nodeStack.push(node); + TreeNode parent = node; + node = children.at(childNumber).b(); + parentIndex.set(parent, node); + searchStack.push(++childNumber); + } + } + } + } + + public TreeMap<String, TreeMap<String, List<TreeNode>>> set(String key, String value, TreeNode node) { + if (key == null) + System.out.println(""); + Optional<TreeMap<String, List<TreeNode>>> indexOp = indexList.get(key); + if (!indexOp.isPresent()) { + TreeMap<String, List<TreeNode>> index = new TreeMap<>(); + List<TreeNode> nodeList = new List<>(); + nodeList = nodeList.addLast(node); + TreeMap newIndex = index.put(value, nodeList); + indexList = indexList.put(key, newIndex); + return indexList; + } + + TreeMap<String, List<TreeNode>> index = indexOp.get(); + Optional<List<TreeNode>> nodeListOp = index.get(value); + + List<TreeNode> newNodeList; + + if (nodeListOp.isPresent()) { + newNodeList = nodeListOp.get().addLast(node); + + } else { + List<TreeNode> nodeList = new List<>(); + newNodeList = nodeList.addLast(node); + + } + TreeMap newIndex = index.put(value, newNodeList); + indexList = indexList.put(key, newIndex); + + return indexList; + } + + public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + return indexList; + } + + public ParentIndex getParentIndex() { + return parentIndex; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/index/ParentIndex.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,55 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.index; + +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.data.treemap.TreeMap; + +import java.util.Iterator; + +public class ParentIndex { + + private TreeMap<TreeNode, TreeNode> parentIndex; + + public ParentIndex() { + parentIndex = new TreeMap<>(); + } + + public boolean isEmpty(){ + return parentIndex.isEmpty(); + } + + public TreeNode get(TreeNode child) { + return parentIndex.get(child).get(); + } + + public ParentIndex set(TreeNode parent ,TreeNode child) { + parentIndex = parentIndex.put(child, parent); + return this; + } + + public ParentIndex delete(TreeNode child) { + parentIndex = parentIndex.delete(child); + return this; + } + + public ParentIndex deleteAllChildren(TreeNode parentNode) { + TreeNodeChildren children = parentNode.getChildren(); + Iterator<TreeNode> childrenIterator = children.iterator(); + for (; childrenIterator.hasNext();) { + TreeNode child = childrenIterator.next(); + parentIndex = parentIndex.delete(child); + } + return this; + } + + public ParentIndex addAllChildren(TreeNode parentNode) { + TreeNodeChildren children = parentNode.getChildren(); + Iterator<TreeNode> childrenIterator = children.iterator(); + for (; childrenIterator.hasNext();) { + TreeNode child = childrenIterator.next(); + parentIndex = parentIndex.put(child, parentNode); + } + return this; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/AppendChildAtOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,48 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +import java.nio.ByteBuffer; + +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.util.Error; + + +public final class AppendChildAtOperation implements NodeOperation +{ + private final int pos; + + public AppendChildAtOperation(int _pos) + { + pos = _pos; + } + + public Command getCommand() + { + return Command.APPEND_CHILD; + } + + @Override + public Either<Error,TreeNode> invoke(TreeNode _target) + { + return _target.getChildren().addNewChildAt(pos); + } + + @Override + public int getPosition() + { + return pos; + } + + @Override + public String getKey() + { + return null; + } + + @Override + public ByteBuffer getValue() + { + return null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DefaultTreeOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,27 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; + +public class DefaultTreeOperation implements TreeOperation +{ + private final NodePath path; + private final NodeOperation operation; + + public DefaultTreeOperation(NodePath _path,NodeOperation _operation) + { + path = _path; + operation = _operation; + } + + @Override + public NodePath getNodePath() + { + return path; + } + + @Override + public NodeOperation getNodeOperation() + { + return operation; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteAttributeOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,48 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public final class DeleteAttributeOperation implements NodeOperation +{ + private final String key; + + public DeleteAttributeOperation(String _key) + { + key = _key; + } + + @Override + public Command getCommand() + { + return Command.DELETE_ATTRIBUTE; + } + + @Override + public Either<Error, TreeNode> invoke(TreeNode _target) + { + return _target.getAttributes().delete(key); + } + + @Override + public int getPosition() + { + return -1; + } + + @Override + public String getKey() + { + return key; + } + + @Override + public ByteBuffer getValue() + { + return null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteChildAtOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,48 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public class DeleteChildAtOperation implements NodeOperation +{ + private final int pos; + + public DeleteChildAtOperation(int _pos) + { + pos = _pos; + } + + @Override + public Command getCommand() + { + return Command.DELETE_CHILD; + } + + @Override + public Either<Error, TreeNode> invoke(TreeNode _target) + { + return _target.getChildren().deleteChildAt(pos); + } + + @Override + public int getPosition() + { + return pos; + } + + @Override + public String getKey() + { + return null; + } + + @Override + public ByteBuffer getValue() + { + return null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/NodeOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,20 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public interface NodeOperation +{ + public Command getCommand(); + public Either<Error,TreeNode> invoke(TreeNode _target); + + public int getPosition(); + public String getKey(); + public ByteBuffer getValue(); +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/PutAttributeOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,50 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +import java.nio.ByteBuffer; + +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.util.Error; + + +public class PutAttributeOperation implements NodeOperation +{ + private final String key; + private final ByteBuffer value; + + public PutAttributeOperation(String _key,ByteBuffer _value) + { + key = _key; + value = _value; + } + + @Override + public Command getCommand() + { + return Command.PUT_ATTRIBUTE; + } + + @Override + public Either<Error,TreeNode> invoke(TreeNode _target) + { + return _target.getAttributes().put(key,value); + } + @Override + public int getPosition() + { + return -1; + } + + @Override + public String getKey() + { + return key; + } + + @Override + public ByteBuffer getValue() + { + return value; + } +} \ 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/store/operations/ReplaceRootNodeOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,37 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +import java.nio.ByteBuffer; + +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.util.Error; + +public class ReplaceRootNodeOperation implements NodeOperation { + + @Override + public Command getCommand() { + return Command.REPLACE_ROOT; + } + + @Override + public Either<Error, TreeNode> invoke(TreeNode target) { + return target.appendRootNode(); + } + + @Override + public int getPosition() { + return -1; + } + + @Override + public String getKey() { + return null; + } + + @Override + public ByteBuffer getValue() { + return null; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/TreeOperation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,9 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; + +public interface TreeOperation +{ + public NodePath getNodePath(); + public NodeOperation getNodeOperation(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/AppendChildAt.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,44 @@ +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.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.OperationLog; +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; + +public class AppendChildAt implements NodeEditor +{ + private final int pos; + + public AppendChildAt(int _pos) + { + pos = _pos; + } + + public Either<Error, LoggingNode> _edit(LoggingNode _e) + { + Either<Error,LoggingNode> either = _e.getChildren().addNewChildAt(pos); + if(either.isA()){ + // error + return either; + } + return DefaultEither.newB(either.b()); + } + + @Override + public Either<Error, LoggingNode> edit(TreeNode _e) { + LoggingNode logNode = wrap(_e); + return _edit(logNode); + } + + public LoggingNode wrap(TreeNode node) { + return new LoggingNode(node); + } + + @Override + public LoggingNode wrap(TreeNode node, OperationLog op) { + return new LoggingNode(node, op); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteAttribute.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,43 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; + + +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.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.OperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public class DeleteAttribute implements NodeEditor +{ + private final String key; + public DeleteAttribute(String _key) + { + key = _key; + } + + public Either<Error,LoggingNode> _edit(LoggingNode logNode) + { + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,LoggingNode> either = logNode.getAttributes().delete(key); + if(either.isA()){ + // error + return either; + } + return DefaultEither.newB(either.b()); + } + + @Override + public Either<Error, LoggingNode> edit(TreeNode _e) { + LoggingNode logNode = wrap(_e); + return _edit(logNode); + } + + public LoggingNode wrap(TreeNode node) { + return new LoggingNode(node); + } + + @Override + public LoggingNode wrap(TreeNode node, OperationLog op) { + return new LoggingNode(node, op); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteChildAt.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,44 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public class DeleteChildAt implements NodeEditor +{ + private final int pos; + public DeleteChildAt(int _pos) + { + pos = _pos; + } + + public Either<Error,LoggingNode> _edit(LoggingNode logNode) + { + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,LoggingNode> either = logNode.getChildren().deleteChildAt(pos); + if(either.isA()){ + // error + return either; + } + return DefaultEither.newB(either.b()); + } + + @Override + public Either<Error, LoggingNode> edit(TreeNode _e) { + LoggingNode logNode = wrap(_e); + return _edit(logNode); + } + + public LoggingNode wrap(TreeNode node) { + return new LoggingNode(node); + } + + @Override + public LoggingNode wrap(TreeNode node, OperationLog op) { + return new LoggingNode(node, op); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/NodeEditor.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,14 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; + + +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.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.OperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public interface NodeEditor +{ + public Either<Error,LoggingNode> edit(TreeNode _e); + public LoggingNode wrap(TreeNode node, OperationLog op); +} \ 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/store/trasnformer/NodeEditorError.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,11 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; + +public class NodeEditorError +{ + public static final Error INDEX_OUT_OF_BOUNDS = new DefaultError(); + public static final Error DELETE_KEY_NOT_FOUND = new DefaultError(); + public static final Error NULL_VALUE_NOT_ALLOWED = new DefaultError(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/PutAttribute.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,48 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; + +import java.nio.ByteBuffer; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.OperationLog; +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; + +public class PutAttribute implements NodeEditor +{ + private final String key; + private final ByteBuffer value; + + public PutAttribute(String _key,ByteBuffer _value) + { + key = _key; + value = _value; + } + + public Either<Error,LoggingNode> _edit(LoggingNode _e) + { + Either<Error,LoggingNode> either = _e.getAttributes().put(key,value); + if(either.isA()){ + // error + return either; + } + return DefaultEither.newB(either.b()); + } + + @Override + public Either<Error, LoggingNode> edit(TreeNode _e) { + LoggingNode logNode = wrap(_e); + return _edit(logNode); + } + + public LoggingNode wrap(TreeNode node) { + return new LoggingNode(node); + } + + @Override + public LoggingNode wrap(TreeNode node, OperationLog op) { + return new LoggingNode(node, op); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/replaceRootNodeAt.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,40 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public class replaceRootNodeAt implements NodeEditor { + + + public Either<Error, LoggingNode> _edit(LoggingNode _e) + { + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,LoggingNode> either = _e.replaceNewRootNode(); + if(either.isA()){ + // error + return either; + } + return DefaultEither.newB(either.b()); + } + + + @Override + public Either<Error, LoggingNode> edit(TreeNode _e) { + LoggingNode logNode = wrap(_e); + return _edit(logNode); + } + + public LoggingNode wrap(TreeNode node) { + return new LoggingNode(node); + } + + + @Override + public LoggingNode wrap(TreeNode node, OperationLog op) { + return new LoggingNode(node, op); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/AbstractTreeMapThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,6 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +public abstract class AbstractTreeMapThread extends Thread{ + public abstract void set(boolean flag); + public abstract long getFindCount(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/DataBaseBenchMark.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,156 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + + +import com.mongodb.MongoClient; +import com.mongodb.WriteConcern; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.MongoDatabase; +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; +import org.bson.Document; +import org.xml.sax.SAXException; + +import javax.xml.parsers.ParserConfigurationException; +import java.io.*; +import java.nio.ByteBuffer; + +public class DataBaseBenchMark { + public static void main(String[] args) throws InterruptedException, IOException, ParserConfigurationException, SAXException { + + if (args.length < 2) { + System.out.println("args[0] = jungle or mongo, args[1] = read or write" ); + System.exit(0); + } + + Runtime rt = Runtime.getRuntime(); + int cpuNum = rt.availableProcessors(); + + if (args[0].equals("jungle")) + jungleBench(args, cpuNum); + else if (args[0].equals("mongo")) + mongoBench(args, cpuNum); + } + + private static void mongoBench(String[] args, int cpuNum) throws IOException, InterruptedException { + MongoClient client = new MongoClient("localhost", 27017); + client.setWriteConcern(WriteConcern.JOURNALED); + client.dropDatabase("mydb"); + MongoDatabase database = client.getDatabase("mydb"); + MongoCollection<Document> coll = database.getCollection("mycoll"); + for (int i = 0; i < 10000; i++) { + if (i % 100 == 0) + System.out.println(i / 100); + coll.insertOne(new Document("key",String.valueOf(i))); + } + coll.createIndex(new Document("key", 1)); + for (final Document index : coll.listIndexes()) { + System.out.println(index.toJson()); + } + File file = new File("./time/" + args[0] + args[1] + "Time"); + PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(file))); + DataBaseBenchMarkThread readThread[]; + for (int THREAD_COUNT = 1; THREAD_COUNT <= cpuNum; THREAD_COUNT++) { + readThread = new DataBaseBenchMarkThread[THREAD_COUNT]; + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count] = new findMongoAttributeThread(coll); + } + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count].start(); + } + System.out.println("StartThread"); + Thread.sleep(1000); + long readCount = 0; + for (int count = 0; THREAD_COUNT > count; count++) { + readCount = readCount + readThread[count].getFindCount(); + readThread[count].set(false); + readThread[count] = null; + } + pw.println(THREAD_COUNT + " " + readCount); + System.out.println(THREAD_COUNT + "readCount = " + readCount); + System.gc(); + System.out.println("-------------GC--------------"); + Thread.sleep(1000); + } + client.close(); + pw.close(); + } + + private static void jungleBench(String[] args, int cpuNum) throws IOException, InterruptedException { + JungleTree tree = createJungleTree(); + File file = new File("./time/" + args[0] + args[0] + "Time"); + PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(file))); + DataBaseBenchMarkThread readThread[]; + + for (int THREAD_COUNT = 1; THREAD_COUNT <= cpuNum; THREAD_COUNT++) { + readThread = new DataBaseBenchMarkThread[THREAD_COUNT]; + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count] = new findTreeAttributeThread(tree); + } + JungleWriteThread writeThread = null; + if (args[1].equals("write")) { + writeThread = new JungleWriteThread(tree); + writeThread.start(); + } + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count].start(); + } + System.out.println("StartThread"); + Thread.sleep(1000); + if (writeThread != null) { + writeThread.set(false); + writeThread.get(); + } + long readCount = 0; + for (int count = 0; THREAD_COUNT > count; count++) { + readCount = readCount + readThread[count].getFindCount(); + readThread[count].set(false); + readThread[count] = null; + } + pw.println(THREAD_COUNT + " " + readCount); + System.out.println(THREAD_COUNT + "readCount = " + readCount); + System.gc(); + System.out.println("-------------GC--------------"); + Thread.sleep(1000); + } + pw.close(); + } + + private static JungleTree createJungleTree() { + Jungle jungle = new DefaultJungle(null, "hoge", new DefaultTreeEditor(new DefaultTraverser())); + JungleTree tree = jungle.createNewTree("tree"); + JungleTreeEditor editor = tree.getTreeEditor(); + editor = editor.putAttribute(new DefaultNodePath(), "key", ByteBuffer.wrap(String.valueOf(0).getBytes())).b(); + JungleTreeEditor newEditor = createTree(0, new DefaultNodePath(), editor); + if (newEditor.success().isA()) { + System.out.println("success faild"); + System.exit(1); + } + return tree; + } + + static Integer nodeNum = 1; + + public static JungleTreeEditor createTree(int deep, NodePath path, JungleTreeEditor editor) { + + String value1 = String.valueOf(nodeNum); + nodeNum++; + String value2 = String.valueOf(nodeNum); + nodeNum++; + editor = editor.addNewChildAt(path, 0).b(); + editor = editor.putAttribute(path.add(0), "key", ByteBuffer.wrap(value1.getBytes())).b(); + editor = editor.addNewChildAt(path, 1).b(); + editor = editor.putAttribute(path.add(1), "key", ByteBuffer.wrap(value2.getBytes())).b(); + deep++; + if (deep < 10) { + editor = createTree(deep, path.add(0), editor); + editor = createTree(deep, path.add(1), editor); + } + return editor; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/DataBaseBenchMarkThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,7 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + + +public abstract class DataBaseBenchMarkThread extends Thread{ + public abstract long getFindCount(); + public abstract void set(boolean flag); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/JungleWriteThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,44 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; + +import java.nio.ByteBuffer; + + +public class JungleWriteThread extends Thread { + + JungleTree tree; + boolean loop = true; + private int writeCount; + + public JungleWriteThread(JungleTree tree) { + this.tree = tree; + } + + public void set(boolean flag) { + loop = flag; + } + + public void get() { + System.out.println("writeCount = " + writeCount); + } + + @Override + public void run() { + while (loop) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + e.printStackTrace(); + } + JungleTreeEditor editor = tree.getTreeEditor(); + editor = editor.putAttribute(new DefaultNodePath(), "key", ByteBuffer.wrap(String.valueOf(0).getBytes())).b(); + if (editor.success().isA()) + System.out.println("faild"); + else + writeCount++; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/TatsukiTreeMapGetThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,39 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.util.Optional; + + +public class TatsukiTreeMapGetThread extends AbstractTreeMapThread { + TreeMap<Long, String> map; + private long findCount; + boolean loop = true; + + public TatsukiTreeMapGetThread(TreeMap<Long,String> map) { + this.map = map; + } + + @Override + public long getFindCount() { + System.out.println("thread count = " + findCount); + return findCount; + } + + @Override + public void set(boolean loop) { + this.loop = loop; + } + + @Override + public void run() { + while (loop) { + for (long count = 0 ; count < 1000; count++) { + Optional<String> value = map.get(count); + if (!value.isPresent()) + System.out.println("error"); + } + findCount++; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/TreeMapBenchMark.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,82 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.io.*; + +/** + * Created by e115731 on 15/03/17. + */ +public class TreeMapBenchMark { + public static void main(String[] args) throws InterruptedException, IOException { + + if (args.length == 0) { + System.out.println("args get or getLoop or list"); + System.exit(0); + } + + Runtime rt = Runtime.getRuntime(); + int cpuNum = rt.availableProcessors(); + + File file = new File("./time/" + args[0] + "Time"); + + PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(file))); + + AbstractTreeMapThread readThread[]; + + for (int THREAD_COUNT = 1; THREAD_COUNT <= cpuNum; THREAD_COUNT++) { + + readThread = new AbstractTreeMapThread[THREAD_COUNT]; + + switch (args[0]) { + case "util": { + java.util.TreeMap<Long, String> map = new java.util.TreeMap<>(); + for (long count = 0; count < 1000; count++) { + map.put(count, String.valueOf(count)); + } + + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count] = new UtilTreeMapGetThread(map); + } + break; + } + case "data": { + TreeMap<Long,String> map = new TreeMap<>(); + for (long count = 0; count < 1000; count++) { + map = map.put(count, String.valueOf(count)); + } + + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count] = new TatsukiTreeMapGetThread(map); + } + break; + } + default: + System.out.println("not allow args"); + System.exit(0); + } + + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count].start(); + } + + System.out.println("StartThread"); + + Thread.sleep(1000); + long readCount = 0; + + for (int count = 0; THREAD_COUNT > count; count++) { + readThread[count].set(false); + readCount = readCount + readThread[count].getFindCount(); + readThread[count].stop(); + } + + pw.println(THREAD_COUNT + " " + readCount); + System.out.println(THREAD_COUNT + "readCount = " + readCount); + Thread.sleep(1000); + } + + pw.close(); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/UtilTreeMapGetThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,37 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import java.util.TreeMap; + + +public class UtilTreeMapGetThread extends AbstractTreeMapThread { + TreeMap<Long, String> map; + private long findCount; + boolean loop = true; + + public UtilTreeMapGetThread(TreeMap<Long, String> map) { + this.map = map; + } + + @Override + public long getFindCount() { + System.out.println("thread count = " + findCount); + return findCount; + } + + @Override + public void set(boolean loop) { + this.loop = loop; + } + + @Override + public void run() { + while (loop) { + for (long count = 0; count < 1000; count++) { + String value = map.get(count); + if (value == null) + System.out.println("error"); + } + findCount++; + } + } +} \ 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/test/findMongoAttributeThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,39 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import com.mongodb.client.FindIterable; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.MongoCursor; +import org.bson.Document; + + +public class findMongoAttributeThread extends DataBaseBenchMarkThread { + private long findCount; + boolean loop = true; + MongoCollection<Document> coll; + + public findMongoAttributeThread( MongoCollection<Document> coll) { + this.coll = coll; + this.findCount = 0; + } + + @Override + public long getFindCount() { + System.out.println("thread count = " + findCount); + return findCount; + } + + public void set(boolean loop) { + this.loop = loop; + } + + @Override + public void run() { + while (loop) { + FindIterable<Document> searchResultList = coll.find(new Document("key","1")); + MongoCursor<Document> iterator = searchResultList.iterator(); + if (iterator.hasNext()) { + findCount++; + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/findTreeAttributeThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,41 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +import java.util.Iterator; + + +public class findTreeAttributeThread extends DataBaseBenchMarkThread { + + JungleTree tree; + private long findCount; + + boolean loop = true; + + public findTreeAttributeThread(JungleTree tree) { + this.tree = tree; + this.findCount = 0; + } + + @Override + public long getFindCount() { + System.out.println("thread count = " + findCount); + return findCount; + } + + public void set(boolean loop) { + this.loop = loop; + } + + @Override + public void run() { + while (loop) { + InterfaceTraverser traverser = tree.getTraverser(true); + Iterator<TreeNode> it = traverser.find(null, "key", "0"); + if (it.hasNext()) { + findCount++; + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/test/readTreeAttributeThread.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,44 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.test; + +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; + +/** + * Created by e115731 on 15/03/17. + */ +public class readTreeAttributeThread extends DataBaseBenchMarkThread { + + JungleTree tree; + private long findCount; + + boolean loop = true; + + public readTreeAttributeThread(JungleTree tree) { + this.tree = tree; + this.findCount = 0; + } + + @Override + public long getFindCount() { + System.out.println("thread couny = " + findCount); + return findCount; + } + + public void set(boolean loop) { + this.loop = loop; + } + + @Override + public void run() { + while (loop) { + TreeNode root = tree.getRootNode(); + if (root != null) { + String attribute = root.getAttributes().getString("key"); + if (attribute.equals("0")) + findCount++; + else + System.out.println("faild"); + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultJungleTreeEditor.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,133 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction; + +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.DefaultTreeOperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.OperationLog; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.logger.TreeOperationLog; +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.*; +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; + +public class DefaultJungleTreeEditor implements JungleTreeEditor +{ + private final TransactionManager txManager; + private final TreeNode root; + private final TreeEditor editor; + private final TreeOperationLog log; + + + public DefaultJungleTreeEditor(TreeNode _root,TransactionManager _txManager,TreeEditor _editor) + { + this(_root,_txManager,_editor,new DefaultTreeOperationLog()); + } + + + + public DefaultJungleTreeEditor(TreeNode newNode,TransactionManager _txManager,TreeEditor _editor,TreeOperationLog _log) + { + this.root = newNode; + this.txManager = _txManager; + this.editor = _editor; + this.log = _log; + } + + private Either<Error,JungleTreeEditor> _edit(final NodePath _path,NodeEditor _e) + { + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,LoggingNode> either = editor.edit(root,_path,_e); + 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 DefaultJungleTreeEditor(newNode,txManager,editor,newTreeOpLog); + return DefaultEither.newB(newEditor); + } + + @Override + public Either<Error,JungleTreeEditor> replaceNewRootNode() + { + replaceRootNodeAt appendChildAt = new replaceRootNodeAt(); + return _edit(new DefaultNodePath(),appendChildAt); + } + + @Override + public Either<Error,JungleTreeEditor> addNewChildAt(NodePath _path, int _pos) + { + AppendChildAt appendChildAt = new AppendChildAt(_pos); + return _edit(_path,appendChildAt); + } + + @Override + public Either<Error,JungleTreeEditor> deleteChildAt(NodePath _path, int _pos) + { + DeleteChildAt deleteChildAt = new DeleteChildAt(_pos); + return _edit(_path,deleteChildAt); + } + + @Override + public Either<Error,JungleTreeEditor> putAttribute(NodePath _path,String _key,ByteBuffer _value) + { + PutAttribute putAttribute = new PutAttribute(_key,_value); + return _edit(_path,putAttribute); + } + + @Override + public Either<Error,JungleTreeEditor> deleteAttribute(NodePath _path, String _key) + { + DeleteAttribute deleteAttribute = new DeleteAttribute(_key); + return _edit(_path,deleteAttribute); + } + + @Override + public Either<Error,JungleTreeEditor> edit(NodePath _path,NodeEditor _editor) + { + return _edit(_path,_editor); + } + + @Override + public Either<Error,JungleTreeEditor> success() + { + Either<Error,TransactionManager> either = txManager.commit(root,log); + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + TransactionManager newTxManager = either.b(); + JungleTreeEditor newTreeEditor = new DefaultJungleTreeEditor(root,newTxManager,editor); + + return DefaultEither.newB(newTreeEditor); + } + + @Override + public Either<Error, JungleTreeEditor> flushSuccess() { + return success(); + } + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTransactionManager.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,88 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction; + + +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.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.traverser.InterfaceTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +import java.util.Iterator; +import java.util.concurrent.atomic.AtomicReference; + +public class DefaultTransactionManager implements TransactionManager { + private final AtomicReference<TreeContext> repository; + private final TreeContext tip; + private final ChangeListWriter writer; + private final String uuid; + + public DefaultTransactionManager(ChangeListWriter _writer, TreeContext _tip, + AtomicReference<TreeContext> _repository, String _uuid) { + repository = _repository; + tip = _tip; + writer = _writer; + uuid = _uuid; + } + + @Override + public Either<Error, TransactionManager> commit(TreeNode newRoot, final TreeOperationLog _log) { + long currentRevision = tip.revision(); + long nextRevision = currentRevision + 1; + + final String _treeName = tip.getTreeName(); + ChangeList list = new ChangeList() { + @Override + public Iterator<TreeOperation> iterator() { + return _log.iterator(); + } + + @Override + public String getTreeName() { + return _treeName; + } + + @Override + public TreeOperationLog getLog() { + return _log; + } + + @Override + public String uuid() { + return uuid; + } + + }; + + InterfaceTraverser traverser = new InterfaceTraverser(newRoot, true); + traverser.createIndex(); + TreeContext newTreeContext = new DefaultTreeContext(newRoot , tip, list, uuid, _treeName, nextRevision,traverser); + + if (repository.compareAndSet(newTreeContext.prev(),newTreeContext)) { + TransactionManager txManager = new DefaultTransactionManager(writer, newTreeContext, repository, uuid); + return DefaultEither.newB(txManager); + } + + return DefaultEither.newA((jp.ac.u_ryukyu.ie.cr.jungle.util.Error) new DefaultError()); + } + + @Override + public Either<Error, TransactionManager> flashCommit(TreeNode _newRoot, TreeOperationLog _log) { + return commit(_newRoot,_log); + } + + @Override + public String getUUID() { + return uuid; + } + + @Override + public long getRevision() { + return tip.revision(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeContext.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,82 @@ +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.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.store.operations.TreeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +public class DefaultTreeContext implements TreeContext { + private final TreeNode root; + private final TreeContext previous; + private final ChangeList changeList; + private final String uuid; + private final String treeName; + private final long revision; + private final InterfaceTraverser traverser; + + public DefaultTreeContext(TreeNode _node, TreeContext _prev, ChangeList _log, String _uuid, String _treeName, long _revision, InterfaceTraverser traverser) { + this.root = _node; + this.previous = _prev; + this.changeList = _log; + this.uuid = _uuid; + this.treeName = _treeName; + this.revision = _revision; + this.traverser = traverser; + } + + + @Override + public TreeNode getRoot() { + return root; + } + + @Override + public TreeContext prev() { + return previous; + } + + @Override + public ChangeList getChangeList() { + return changeList; + } + + @Override + public String uuid() { + return uuid; + } + + @Override + public String getTreeName() { + return treeName; + } + + @Override + public long revision() { + return revision; + } + + @Override + public Iterable<TreeOperation> getOperations() { + return changeList; + } + + @Override + public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + return traverser.getIndex(); + } + + @Override + public ParentIndex getParentIndex() { + return traverser.getParentIndex(); + } + + @Override + public InterfaceTraverser getTraverser() { + return traverser; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNode.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,60 @@ +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(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNodeAttribute.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,80 @@ +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(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNodeChildren.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,108 @@ +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.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> 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); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/TransactionManager.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,15 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.util.Error; + +public interface TransactionManager +{ + public Either<Error,TransactionManager> commit(TreeNode _newRoot,TreeOperationLog _log); + public Either<Error,TransactionManager> flashCommit(TreeNode _newRoot,TreeOperationLog _log); + public String getUUID(); + public long getRevision(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultEvaluation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,25 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +public class DefaultEvaluation implements Evaluation +{ + private final Result result; + private final Evaluator evaluator; + + public DefaultEvaluation(Result _result,Evaluator _evaluator) + { + result = _result; + evaluator = _evaluator; + } + + @Override + public Result result() + { + return result; + } + + @Override + public Evaluator evaluator() + { + return evaluator; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultEvaluator.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,38 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; + +public class DefaultEvaluator implements Evaluator { + private final NodePath path; + + public DefaultEvaluator(NodePath _path) { + path = _path; + } + + @Override + public Evaluation evaluate(TreeNode _current, int _pos) { + Pair<Integer, NodePath> pop = path.pop(); + int head = pop.left(); + + if (path.size() == 1) { + if (head == _pos) { + return new DefaultEvaluation(Result.GOAL, null); + } + } + + DefaultEvaluator nextEvaluator; + Result result; + if (head == _pos) { + result = Result.ACCEPT; + nextEvaluator = new DefaultEvaluator(pop.right()); + } else { + result = Result.CONTINUE; + nextEvaluator = null; + } + + + return new DefaultEvaluation(result, nextEvaluator); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,137 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +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.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 java.util.Iterator; + + +public class DefaultTraverser implements Traverser { + @Override + public Either<Error, Traversal> traverse(final TreeNode _root, Evaluator _evaluator) { + Children wrapper = new Children() { + @Override + public Iterator<TreeNode> iterator() { + List<TreeNode> list = new List(); + return list.addLast(_root).iterator(); + } + + @Override + public int size() { + return 1; + } + + @Override + public Either<Error, TreeNode> at(int _pos) { + if (_pos != 0) { + return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + return DefaultEither.newB(_root); + } + }; + + //Children<T> chs = _root.getChildren(); + Children chs = wrapper; + + Either<Error, List<Direction<TreeNode>>> ret = _traverse(chs, _evaluator, -1); + + if (ret.isA()) { + return DefaultEither.newA(ret.a()); + } + + List<Direction<TreeNode>> list = ret.b(); + + final Iterable<Direction<TreeNode>> iterable = list; + final TreeNode destination = ret.b().head().getTarget(); + + Traversal traversal = new Traversal() { + @Override + public Iterator<Direction<TreeNode>> iterator() { + return iterable.iterator(); + } + + @Override + public TreeNode destination() { + return destination; + } + }; + + return DefaultEither.newB(traversal); + } + + private Either<Error, List<Direction<TreeNode>>> _traverse(Children _chs, Evaluator _evaluator, int _pos) { + int pos = _pos; + for (TreeNode ch : _chs) { + Evaluation e = _evaluator.evaluate(ch, pos); + Result r = e.result(); + if (r == Result.ACCEPT) { + return _accept(ch, pos, e.evaluator()); + } + + if (r == Result.GOAL) { + return DefaultEither.newB(_goal(ch, pos)); + } + + if (r == Result.BREAK) { + break; + } + + if (r == Result.CONTINUE) { + pos++; + continue; + } + + return DefaultEither.newA(TraverserError.UNDEFINED_OPERATOR); + } + + return DefaultEither.newA(TraverserError.PATH_NOT_FOUND); + } + + private List<Direction<TreeNode>> _goal(final TreeNode _current, final int _pos) { + Direction<TreeNode> d = new Direction<TreeNode>() { + @Override + public int getPosition() { + return _pos; + } + + @Override + public TreeNode getTarget() { + return _current; + } + }; + + List<Direction<TreeNode>> list = new List(); + List<Direction<TreeNode>> newList = list.addLast(d); + + return newList; + } + + private <T extends TreeNode> Either<Error, List<Direction<TreeNode>>> _accept(final T _current, final int _pos, Evaluator _evaluator) { + Children chs = _current.getChildren(); + Either<Error, List<Direction<TreeNode>>> either = _traverse(chs, _evaluator, 0); + if (either.isA()) { + return either; + } + + List<Direction<TreeNode>> list = either.b(); + Direction<TreeNode> d = new Direction<TreeNode>() { + @Override + public int getPosition() { + return _pos; + } + + @Override + public T getTarget() { + return _current; + } + }; + + List<Direction<TreeNode>> newList = list.addLast(d); + return DefaultEither.newB(newList); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Direction.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,7 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +public interface Direction<T> +{ + public int getPosition(); + public T getTarget(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Evaluation.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,7 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +public interface Evaluation +{ + public Result result(); + public Evaluator evaluator(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Evaluator.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,8 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; + +public interface Evaluator +{ + public Evaluation evaluate(TreeNode _current,int _pos); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/InterfaceTraverser.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,317 @@ +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.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.query.PathNodeIterator; +import jp.ac.u_ryukyu.ie.cr.jungle.query.Query; +import jp.ac.u_ryukyu.ie.cr.jungle.store.index.IndexCreater; +import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.util.Iterator; +import java.util.Optional; + +public class InterfaceTraverser { + + TreeNode root; + TreeMap<String, TreeMap<String, List<TreeNode>>> indexList; + ParentIndex parentIndex; + boolean parentUpdateFlag; + boolean useIndex; + + public InterfaceTraverser(TreeNode root, boolean indexFlag) { + this(root, new TreeMap<>(), new ParentIndex(), indexFlag); + } + + public InterfaceTraverser(TreeNode root, TreeMap<String, TreeMap<String, List<TreeNode>>> index, + ParentIndex parentIndex, boolean useIndex) { + this.root = root; + this.indexList = index; + this.parentIndex = parentIndex; + if (parentIndex.isEmpty()) + parentUpdateFlag = true; + else + parentUpdateFlag = false; + this.useIndex = useIndex; + } + + public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + return indexList; + } + + public void commit() { + parentUpdateFlag = false; + } + + public ParentIndex getParentIndex() { + return parentIndex; + } + + public void createIndex() { + // long t1 = System.currentTimeMillis(); + IndexCreater creater = new IndexCreater(root); + // long t2 = System.currentTimeMillis(); + // System.out.println("createIndex time = " + (t2 - t1)); + indexList = creater.getIndex(); + parentIndex = creater.getParentIndex(); + } + + /** + * subTree以下のNodeに対してKey,Valueのペアでindexを使って探索を行う + * + * @param query + * @param subTree + * @param key + * @param searchValue + * @return + */ + // public Iterator<TreeNode> findInSubTree(final Query query, TreeNode + // subTree, String key, String searchValue) { + // /* + // * indexを使って取ってきたNodeのPathと、subTreeのPathを先頭から1つずつ比較し、 + // * indexから取ってきたNodeのPathが一致した場合、そのNodeを返す + // */ + // Iterator<TreeNode> nodeIterator = index.get(key, searchValue); + // if (nodeIterator.hasNext() && useIndex) { + // + // // ここでNode以下にあるか調べる + // List<TreeNode> filteredList = List.nil(); + // + // for (;nodeIterator.hasNext();) { + // TreeNode targetNode = nodeIterator.next(); + // TreeNode parent = targetNode; + // while (parent != null) { + // parent = parentIndex.get(parent); + // if (parent.equals(subTree)) + // filteredList = filteredList.cons(targetNode); + // } + // } + // + // return filteredList.iterator(); + // + // } else { + // final PathNodeIterator itNode = new PathNodeIterator(subTree); + // return new Iterator<TreeNode>() { + // + // private TreeNode matchNode = nextmatch(itNode); + // + // private TreeNode nextmatch(PathNodeIterator itNode) { + // + // for (; itNode.hasNext();) { + // TreeNode targetNode = itNode.next(); + // if (query.condition(targetNode)) + // return targetNode; + // } + // return null; + // } + // + // @Override + // public boolean hasNext() { + // if (matchNode == null) { + // return false; + // } + // return true; + // } + // + // @Override + // public TreeNode next() { + // TreeNode currentNode = matchNode; + // matchNode = nextmatch(itNode); + // return currentNode; + // } + // + // @Override + // public void remove() { + // } + // + // }; + // } + // } + + /** + * subTree以下のNodeに対してKeyに対応する値をindexを使って探索する + */ + // public Iterator<TreeNode> findInSubTreeAllValue(final Query query, TreeNode + // subTree, String key) { + // /* + // * indexからinnerIndexを取得 取得したinnerIndexが保有するKeyを取得 + // * そのKeyを保有するNodeとNodeのPathを取得する + // * indexを使って取ってきたNodeのPathと、subTreeのPathを先頭から1つずつ比較し、 + // * indexから取ってきたNodeのPathが一致した場合、そのNodeを返す + // */ + // Iterator<TreeNode> NodeIterator = index.getAll(key); + // if (NodeIterator != null && useIndex) { + // List<TreeNode> filteredList = List.nil(); + // for (; NodeIterator.hasNext();) { + // TreeNode targetNode = NodeIterator.next(); + // TreeNode parent = targetNode; + // while (parent != null) { + // parent = parentIndex.get(parent); + // if (parent.equals(subTree)) + // filteredList = filteredList.cons(targetNode); + // } + // } + // return filteredList.iterator(); + // + // } else { + // + // final PathNodeIterator itNode = new PathNodeIterator(subTree); + // return new Iterator<TreeNode>() { + // + // private TreeNode matchPair = nextmatch(itNode); + // + // private TreeNode nextmatch(PathNodeIterator itNode) { + // + // for (; itNode.hasNext();) { + // TreeNode targetNode = itNode.next(); + // if (query.condition(targetNode)) + // return targetNode; + // } + // return null; + // } + // + // @Override + // public boolean hasNext() { + // if (matchPair == null) { + // return false; + // } + // return true; + // } + // + // @Override + // public TreeNode next() { + // TreeNode currentNode = matchPair; + // matchPair = nextmatch(itNode); + // return currentNode; + // } + // + // @Override + // public void remove() { + // } + // + // }; + // } + // } + private TreeNode nextmatch(TreeNode node, Query query) { + if (query.condition(node)) + return node; + return null; + } + + + public Iterator<TreeNode> find(final Query query, final String key, String searchValue) { + + Iterator<TreeNode> nodeIterator; + if (key != null && searchValue != null && useIndex) { + nodeIterator = get(key, searchValue); + ; + } else { + nodeIterator = new PathNodeIterator(root); + } + + TreeNode firstMatchNode = null; + for (; nodeIterator.hasNext(); ) { + firstMatchNode = nextmatch(nodeIterator.next(), query); + if (firstMatchNode != null) + break; + } + + final TreeNode finalFirstMatchNode = firstMatchNode; + + return new Iterator<TreeNode>() { + + TreeNode matchNode = finalFirstMatchNode; + + @Override + public boolean hasNext() { + if (matchNode == null) { + return false; + } + return true; + } + + @Override + public TreeNode next() { + TreeNode currentPair = matchNode; + for (; nodeIterator.hasNext(); ) { + matchNode = nextmatch(nodeIterator.next(), query); + } + return currentPair; + } + + @Override + public void remove() { + } + + }; + } + + // public Iterator<TreeNode> findAll(final Query query, final String key) { + // + // Iterator<TreeNode> nodeList = index.getAll(key); + // if (nodeList != null && useIndex) { + // + // return nodeList; + // + // } else { + // + // final PathNodeIterator itNode = new PathNodeIterator(node); + // return new Iterator<TreeNode>() { + // + // private TreeNode matchNode = nextmatch(itNode); + // + // private TreeNode nextmatch(PathNodeIterator itNode) { + // + // for (; itNode.hasNext();) { + // TreeNode targetNode = itNode.next(); + // String value = targetNode.getAttributes().getString(key); + // if (useIndex) { + // if (value != null) + // index = index.set(key, value, targetNode); + // } + // if (parentUpdateFlag); + // // parentIndex = parentIndex.set(targetNode); + // if (query.condition(targetNode)) + // return targetNode; + // } + // if (useIndex || parentUpdateFlag) + // commit(); + // return null; + // } + // + // @Override + // public boolean hasNext() { + // if (matchNode == null) { + // return false; + // } + // return true; + // } + // + // @Override + // public TreeNode next() { + // TreeNode currentPair = matchNode; + // matchNode = nextmatch(itNode); + // return currentPair; + // } + // + // @Override + // public void remove() { + // } + // + // }; + // } + // } + + public Iterator<TreeNode> get(String key, String value) { + Optional<TreeMap<String, List<TreeNode>>> indexOp = indexList.get(key); + if (!indexOp.isPresent()) + return null; + + Optional<List<TreeNode>> nodeListOp = indexOp.get().get(value); + if (!nodeListOp.isPresent()) + return new NulIterator<TreeNode>(); + + return nodeListOp.get().iterator(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Result.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,22 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +public class Result +{ + + public static final Result ACCEPT = new Result("ACCEPT"); + public static final Result CONTINUE = new Result("CONTINUE"); + public static final Result BREAK = new Result("BREAK"); + public static final Result GOAL = new Result("GOAL"); + + private final String name; + + private Result(String _name) + { + name = _name; + } + + public String toString() + { + return name; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Traversal.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,8 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; + +public interface Traversal extends Iterable<Direction<TreeNode>> +{ + public TreeNode destination(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Traverser.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,12 @@ +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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +public interface Traverser +{ + public Either<Error,Traversal> traverse(final TreeNode _root,Evaluator _evaluator); + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/TraverserError.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,10 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; + +public class TraverserError +{ + public static final jp.ac.u_ryukyu.ie.cr.jungle.util.Error UNDEFINED_OPERATOR = new DefaultError(); + public static final Error PATH_NOT_FOUND = new DefaultError(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/DefaultEither.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,47 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public class DefaultEither<A,B> implements Either<A,B> +{ + private final A theA; + private final B theB; + + private DefaultEither(A _theA,B _theB) + { + theA = _theA; + theB = _theB; + } + + public static final <A,B> DefaultEither<A,B> newA(A _theA) + { + return new DefaultEither<A,B>(_theA,null); + } + + public static final <A,B> DefaultEither<A,B> newB(B _theB) + { + return new DefaultEither<A,B>(null,_theB); + } + + @Override + public A a() + { + return theA; + } + + @Override + public boolean isA() + { + return theA != null; + } + + @Override + public B b() + { + return theB; + } + + @Override + public boolean isB() + { + return theB != null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/DefaultError.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,5 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public class DefaultError implements Error +{ +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/Either.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,9 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public interface Either<A,B> +{ + public A a(); + public boolean isA(); + public B b(); + public boolean isB(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/Error.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,5 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public interface Error { + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/GetOldTreeError.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,5 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public class GetOldTreeError implements Error { + public static final Error OLD_TREE_NOT_FOUND = new DefaultError(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/IterableConverter.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,56 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +import java.util.Iterator; + +public class IterableConverter<A,B> implements Iterable<A> +{ + private final Iterable<B> iterable; + private final Converter<A,B> converter; + + public IterableConverter(Iterable<B> _iterable,Converter<A,B> _converter) + { + iterable = _iterable; + converter = _converter; + } + + @Override + public Iterator<A> iterator() + { + return new IteratorConverter<A,B>(iterable.iterator(),converter); + } + + private static final class IteratorConverter<A,B> implements Iterator<A> + { + private final Iterator<B> iterator; + private final Converter<A,B> converter; + + public IteratorConverter(Iterator<B> _iterator,Converter<A,B> _converter) + { + iterator = _iterator; + converter = _converter; + } + + @Override + public boolean hasNext() + { + return iterator.hasNext(); + } + + @Override + public A next() + { + return converter.conv(iterator.next()); + } + + @Override + public void remove() + { + iterator.remove(); + } + } + + public static interface Converter<A,B> + { + public A conv(B _b); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/Pair.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,23 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public class Pair<L,R> +{ + private L left; + private R right; + + public Pair(L _left,R _right) + { + left = _left; + right = _right; + } + + public L left() + { + return left; + } + + public R right() + { + return right; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/Triple.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,45 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.util; + +public class Triple<A,B,C> +{ + private A a; + private B b; + private C c; + + public Triple(A _a,B _b,C _c) + { + a = _a; + b = _b; + c = _c; + } + + public A getA() + { + return a; + } + + public B getB() + { + return b; + } + + public C getC() + { + return c; + } + + public void setA(A _a) + { + a = _a; + } + + public void setB(B _b) + { + b = _b; + } + + public void setC(C _c) + { + c = _c; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/DefaultJungleTreeTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,57 @@ +import java.nio.ByteBuffer; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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; +import junit.framework.Assert; +import junit.framework.TestCase; + +public class DefaultJungleTreeTest extends TestCase { + public Jungle instance() { + Jungle j = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor(new DefaultTraverser())); + return j; + } + + public static final String key = "KEY"; + public static final ByteBuffer value = ByteBuffer.wrap(key.getBytes()); + + public void testSampleTest() { + Jungle j = instance(); + j.createNewTree("tree"); + JungleTree tree = j.getTreeByName("tree"); + Assert.assertEquals(0, tree.revision()); + JungleTreeEditor editor1 = tree.getTreeEditor(); + JungleTreeEditor editor2 = tree.getTreeEditor(); + + DefaultNodePath root = new DefaultNodePath(); + Either<Error, JungleTreeEditor> either = editor1.putAttribute(root, key, value); + if (either.isA()) { + } + editor1 = either.b(); + editor1.success(); + editor1.addNewChildAt(root, 0); + // check the value ; + TreeNode node = tree.getRootNode(); + ByteBuffer v = node.getAttributes().get(key); + Assert.assertEquals(0, v.compareTo(value)); + Assert.assertEquals(1, tree.revision()); + // editor2 must fail transction + either = editor1.putAttribute(root.add(0), key, value); + if (either.isA()) { + } + editor2 = either.b(); + Either<Error, JungleTreeEditor> r = editor2.success(); + } + + public void testIsolation() { + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/JDBCTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,53 @@ +package jp.ac.u_ryukyu.ie.cr; +import org.junit.Test; + +import java.sql.*; + +/** + * Created by e135768K on 2016/11/29. + */ +public class JDBCTest { + @Test + public void GetTest () { + try { + Class.forName("com.mysql.jdbc.Driver"); + Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/labo", "root", "1128kazu"); + + Statement stmt = conn.createStatement(); + + // INSERT + stmt.executeUpdate("INSERT INTO type (name) VALUES ('Teacher')"); + stmt.executeUpdate("INSERT INTO type (name) VALUES ('Student')"); + + stmt.executeUpdate("INSERT INTO user (name, age) VALUES ('Kono', 30)"); + stmt.executeUpdate("INSERT INTO user (name, age) VALUES ('Takeda', 20)"); + stmt.executeUpdate("INSERT INTO user (name, age) VALUES ('Miyagi', 21)"); + stmt.executeUpdate("INSERT INTO user (name, age) VALUES ('Higashionna', 22)"); + + stmt.executeUpdate("INSERT INTO college (user_id, type_id) VALUES (1, 1)"); + stmt.executeUpdate("INSERT INTO college (user_id, type_id) VALUES (2, 2)"); + stmt.executeUpdate("INSERT INTO college (user_id, type_id) VALUES (3, 2)"); + stmt.executeUpdate("INSERT INTO college (user_id, type_id) VALUES (4, 2)"); + + + // SELECT + ResultSet set = stmt.executeQuery("SELECT * FROM type WHERE name=\"Teacher\""); + int type_id = 0; + while (set.next()){ + type_id = set.getInt(1); + } + ResultSet rset = stmt.executeQuery("SELECT name, age FROM college JOIN user on user_id=user.id where type_id=" + type_id); + + while ( rset.next() ) { + System.out.println(rset.getString(1) + "\t" + rset.getString(2)); + } + + // rset.close(); + stmt.close(); + conn.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/JungleTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,117 @@ +package jp.ac.u_ryukyu.ie.cr; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.DefaultNode; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.Node; +import jp.ac.u_ryukyu.ie.cr.jungle.persistent.NullJournal; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +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.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import org.junit.Test; + +import java.nio.ByteBuffer; +import java.security.Key; +import java.util.Iterator; + +/** + * Created by e135768K on 2016/11/29. + */ +public class JungleTest { + + public static Jungle jungle; + public static DefaultNodePath root = new DefaultNodePath(); + @Test + public void GetTest () { + jungle = new DefaultJungle(new NullJournal(), "Labo", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("User"); + JungleTree tree = jungle.getTreeByName("User"); + // Insert + JungleTreeEditor editor = tree.getTreeEditor(); + + editor = put(editor, root, "Name", "Kono"); + editor = put(editor, root, "Age", "40"); + editor = put(editor, root, "Type", "Teacher"); + + editor = put(editor, root, 0, "Name", "Takeda"); + editor = put(editor, root, 0, "Age", "20"); + editor = put(editor, root, 0, "Type", "Student"); + + editor = put(editor, root, 1, "Name", "Miyagi"); + editor = put(editor, root, 1, "Age", "22"); + editor = put(editor, root, 1, "Type", "Student"); + + editor = put(editor, root, 2, "Name", "Higashionna"); + editor = put(editor, root, 2, "Age", "20"); + editor = put(editor, root, 2, "Type", "Student"); + + Either<Error, JungleTreeEditor> either = editor.success(); + if (either.isA()) + Assert.fail(); + + tree = jungle.getTreeByName("User"); + + // Find + InterfaceTraverser traverser = tree.getTraverser(false); + Iterator<TreeNode> iterator = traverser.find((TreeNode node) -> { + String value = node.getAttributes().getString("Name"); + if (value == null) + return false; + if (value.equals("Takeda")) + return true; + return false; + }, "Type", "Student"); + + while (iterator.hasNext()){ + System.out.println(iterator.next().getAttributes().getString("Name")); + } + // Get +// ByteBuffer kono_age = get("User", root, "Shinji"); +// ByteBuffer kazuma_age = get("User", root.add(0), "Kazuma"); +// ByteBuffer mitsuki_age = get("User", root.add(1), "Mitsuki"); +// ByteBuffer takui_age = get("User", root.add(2), "Takui"); + } + + public JungleTreeEditor put(JungleTreeEditor editor, NodePath path, int n, String key, String value) { + + Either<Error, JungleTreeEditor> either = editor.addNewChildAt(path, n); + if (either.isA()) + Assert.fail(); + editor = either.b(); + + either = editor.putAttribute(path.add(n), key, ByteBuffer.wrap(value.getBytes())); + if (either.isA()) + Assert.fail(); + editor = either.b(); + return editor; + } + + public JungleTreeEditor put(JungleTreeEditor editor, NodePath path, String key, String value) { + + Either<Error, JungleTreeEditor> either = editor.putAttribute(path, key, ByteBuffer.wrap(value.getBytes())); + if (either.isA()) + Assert.fail(); + editor = either.b(); + return editor; + } + + public ByteBuffer get (String treeName, NodePath path, String key) { + JungleTree tree = jungle.getTreeByName(treeName); + Either<Error, TreeNode> e = tree.getNodeOfPath(path); + if (e.isA()) + Assert.fail(); + TreeNode node = e.b(); + return node.getAttributes().get(key); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/appendTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,35 @@ +package jp.ac.u_ryukyu.ie.cr.data.list; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import junit.framework.Assert; +import org.junit.Test; + +import java.util.Iterator; + +/** + * Created by e115731 on 15/05/19. + */ +public class appendTest { + @Test + public void appendTest() { + + List<Integer> list = new List<>(); + for (int count = 1; count <= 10; count++) { + list = list.addLast(count); + } + + List<Integer> list2 = new List<>(); + for (int count = 11; count <= 20; count++) { + list2 = list2.addLast(count); + } + + List<Integer> newList = list.append(list2); + Iterator<Integer> iterator = newList.iterator(); + for (int count = 1; count <= 20; count++) { + Assert.assertTrue(iterator.hasNext()); + int num = iterator.next(); + Assert.assertEquals(num, count); + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/deleteTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,29 @@ +package jp.ac.u_ryukyu.ie.cr.data.list; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import junit.framework.Assert; +import org.junit.Test; + +/** + * Created by e115731 on 15/05/18. + */ +public class deleteTest { + @Test + public void deleteTest() { + List<Integer> list = new List<Integer>(); + + for (int count = 0; count < 10; count++) { + list = list.addLast(count); + } + List<Integer> newList = list.delete(5); + Assert.assertEquals(newList.length(),9); + newList = newList.deleteHead(); + int attribute = newList.index(1); + Assert.assertEquals(attribute,2); + Assert.assertEquals(newList.length(),8); + newList = newList.deleteLast(); + attribute = newList.index(6); + Assert.assertEquals(attribute,8); + Assert.assertEquals(list.length(),10); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/listAdd.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,39 @@ +package jp.ac.u_ryukyu.ie.cr.data.list; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import junit.framework.Assert; +import org.junit.Test; + +/** + * Created by e115731 on 15/05/17. + */ +public class listAdd { + + @Test + public void listAddTest() { + + List<Integer> list = new List<Integer>(); + List<Integer> list2 = new List<Integer>(); + + for (int count = 0; count < 10; count++) { + list = list.addLast(count); + list2 = list2.add(count, count); + } + + for (int count = 0; count < 10; count++) { + int num = list.index(count); + int num2 = list2.index(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); + Assert.assertEquals(num,5); + Assert.assertEquals(num2,50); + + } + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/listIterator.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,33 @@ +package jp.ac.u_ryukyu.ie.cr.data.list; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import junit.framework.Assert; +import org.junit.Test; + +import java.util.Iterator; + +/** + * Created by e115731 on 15/05/17. + */ +public class listIterator { + @Test + public void listIteratorTest() { + List<Integer> list = new List<Integer>(); + for (int count = 1; count < 10; count++) { + list = list.addLast(count); + } + Iterator<Integer> iterator = list.iterator(); + for (int count = 1; count < 10; count++) { + Assert.assertTrue(iterator.hasNext()); + int attribute = iterator.next(); + Assert.assertEquals(attribute, count); + } + + iterator = list.reverseIterator(); + for (int count = 9; count > 0; count--) { + Assert.assertTrue(iterator.hasNext()); + int attribute = iterator.next(); + Assert.assertEquals(attribute, count); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/replaceTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,25 @@ +package jp.ac.u_ryukyu.ie.cr.data.list; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import junit.framework.Assert; +import org.junit.Test; + +/** + * Created by e115731 on 15/05/18. + */ +public class replaceTest { + @Test + public void replaceTest() { + List<Integer> list = new List<Integer>(); + for (int count = 0; count < 10; count++) { + list = list.addLast(count); + } + List<Integer> newList = list.replace(5, 15); + Assert.assertEquals(list.length(), 10); + int attribute = list.index(5); + Assert.assertEquals(attribute, 5); + attribute = newList.index(5); + Assert.assertEquals(newList.length(), 10); + Assert.assertEquals(attribute, 15); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/treemap/TreeMapDelete.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,32 @@ +package jp.ac.u_ryukyu.ie.cr.data.treemap; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.RotateParent; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.Collections; + +public class TreeMapDelete { + + @Test + public void TreeMapDeleteTest() throws RotateParent { + TreeMap<Integer, Integer> map = new TreeMap<>(); + for (int count = 1; count < 1000; count++) { + map = map.put(count, count); + map.checkDepth(); + } + + ArrayList<Integer> list = new ArrayList<>(); + for (int i = 1; i < 1000; i++) { + list.add(i); + } + Collections.shuffle(list); + for (Integer num : list) { + System.out.println(num); + map = map.delete(num); + map.checkDepth(); + } + System.out.println("end"); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/treemap/TreeMapTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,43 @@ +package jp.ac.u_ryukyu.ie.cr.data.treemap; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; +import org.junit.Test; + +import java.util.Optional; + +public class TreeMapTest { + + @Test + public void TreeMapTest() { + TreeMap<Integer, Integer> map = new TreeMap<>(); + for (int count = 100; count > -10; count--) { + map = map.put(count, count); + map.checkDepth(); + System.out.println("-------------------------------------------"); + } + + for (int count = 100; count > -10; count--) { + + Optional<Integer> op = map.get(count); + if (op.isPresent()) + System.out.println(op.get()); + } + + System.out.println("end"); + } +} + + + + + + + + + + + + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/treemap/TreeNodeIteratorTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,30 @@ +package jp.ac.u_ryukyu.ie.cr.data.treemap; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; +import junit.framework.Assert; +import org.junit.Test; + +import java.util.Iterator; + +/** + * Created by e115731 on 15/05/06. + */ +public class TreeNodeIteratorTest { + @Test + public void getKeyTest() { + TreeMap<Integer, Integer> map = new TreeMap(); + for (int attributeMaxCount = 10; attributeMaxCount < 1000; attributeMaxCount = attributeMaxCount + 10) { + for (int count = 0; count < attributeMaxCount; count++) { //insertData + map = map.put(count, count); + } + Iterator<Integer> it = map.keys(); + int iteratorCount = 0; + while (it.hasNext()) { // count return iterator Attribute Count + iteratorCount++; + System.out.println(it.next()); + } + Assert.assertTrue(iteratorCount == attributeMaxCount); // check + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/DefaultTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,21 @@ +package jp.ac.u_ryukyu.ie.cr.jungle; + +import org.junit.Test; + +import java.util.TreeMap; + +/** + * Created by e115731 on 15/05/17. + */ +public class DefaultTest { + + @Test + public void Test() { + TreeMap map = new TreeMap(); + for (int i = 0; i < 10; i++) { + map.put(i, i); + } + } + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/AttributesContainerTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,22 @@ +//package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core; +// +//import org.junit.Assert; +//import org.junit.Ignore; +//import org.junit.Test; +// +//import junit.framework.TestCase; +// +//@Ignore +//public abstract class AttributesContainerTest extends TestCase +//{ +// public abstract AttributesContainer instance(); +// +// @Test +// public void testGetAttributes() +// { +// AttributesContainer instance = instance(); +// Attributes attrs = instance.getAttributes(); +// +// Assert.assertNotNull(attrs); +// } +//}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/AttributesTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,33 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import junit.framework.Assert; +import junit.framework.TestCase; +import org.junit.Ignore; + +import java.nio.ByteBuffer; + +@Ignore +public abstract class AttributesTest extends TestCase { + @SuppressWarnings("unchecked") + public static List<Pair<String, ByteBuffer>> ENTRIES = new List( + new Pair("KEY1", ByteBuffer.wrap("VALUE1".getBytes())), + new Pair("KEY2", ByteBuffer.wrap("VALUE2".getBytes())), + new Pair("KEY3", ByteBuffer.wrap("VALUE3".getBytes())) + ); + + public abstract Attributes instance(); + + public void testGet() { + Attributes attrs = instance(); + + for (Pair<String, ByteBuffer> entry : ENTRIES) { + String key = entry.left(); + ByteBuffer expect = entry.right(); + ByteBuffer actual = attrs.get(key); + Assert.assertNotNull(actual); + Assert.assertEquals(0, actual.compareTo(expect)); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/ChildrenTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,20 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core; + + +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNodeChildren; +import junit.framework.Assert; +import junit.framework.TestCase; + +public abstract class ChildrenTest<T> extends TestCase +{ + public abstract int expectSize(); + public abstract DefaultTreeNodeChildren instance(); + + public void testSize() + { + int expect = expectSize(); + Children children = instance(); + + Assert.assertEquals(expect,children.size()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/GetNodeOfPathTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,48 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +import junit.framework.Assert; +import org.junit.Test; + +import java.nio.ByteBuffer; +import java.util.Iterator; + +public class GetNodeOfPathTest { + + @Test + public void getNodeOfPathTest() { + Jungle jungle = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("tree"); + JungleTree tree = jungle.getTreeByName("tree"); + JungleTreeEditor editor = tree.getTreeEditor(); + DefaultNodePath path = new DefaultNodePath(); + editor = editor.addNewChildAt(path, 0).b(); + path = path.add(0); + editor = editor.putAttribute(path, "KEY", ByteBuffer.wrap("data".getBytes())).b(); + editor = editor.addNewChildAt(path, 0).b(); + path = path.add(0); + editor = editor.putAttribute(path, "KEY", ByteBuffer.wrap("kanagawa".getBytes())).b(); + editor.success(); + InterfaceTraverser traverser = tree.getTraverser(true); + Iterator<TreeNode> nodeIterator = traverser.find((TreeNode node) -> { + String str = node.getAttributes().getString("KEY"); + if (str == null) + return false; + if (str.equals("kanagawa")) + return true; + return false; + }, "KEY", "kanagawa"); + + TreeNode node = tree.getNodeOfPath(path).b(); + Assert.assertTrue(nodeIterator.hasNext()); + Assert.assertEquals(node, nodeIterator.next()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/GetOldTreeTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,46 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core; + + +import java.nio.ByteBuffer; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import org.junit.Test; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; + +public class GetOldTreeTest { + + @Test + public void getOldTreeTest() { + Jungle jungle = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("tree"); + JungleTree tree = jungle.getTreeByName("tree"); + JungleTreeEditor editor = tree.getTreeEditor(); + DefaultNodePath path = new DefaultNodePath(); + + for (int num = 0; num < 10; num++) { + JungleTreeEditor addChildEditor = editor.addNewChildAt(path, num).b(); + JungleTreeEditor putAttributeEditor = addChildEditor.putAttribute(path.add(num), "test", ByteBuffer.wrap("data".getBytes())).b(); + Either<Error, JungleTreeEditor> successEither = putAttributeEditor.success(); + Assert.assertFalse(successEither.isA()); + editor = successEither.b(); + } + System.out.println(tree.revision()); + TreeNode root = tree.getRootNode(); + Assert.assertTrue(root.getChildren().at(9).isB()); + + JungleTree oldTree = tree.getOldTree(9).b(); + System.out.println(oldTree.revision()); + TreeNode oldRoot = oldTree.getRootNode(); + Assert.assertTrue(oldRoot.getChildren().at(9).isA()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/ParentTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,22 @@ +/*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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/impl/treeeditor/DefaultTreeEditorTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,89 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core.impl.treeeditor; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.traverser.DefaultEvaluator; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traversal; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import junit.framework.TestCase; + +import java.nio.ByteBuffer; + +public class DefaultTreeEditorTest extends TestCase { + public DefaultTreeEditor instance() { + DefaultTraverser traverser = new DefaultTraverser(); + return new DefaultTreeEditor(traverser); + } + + public void testEdittingDoesNotEffectToOtherTree() { + TreeNode root = TestUtil.createMockTree(3); + DefaultTreeEditor editor = new DefaultTreeEditor(new DefaultTraverser()); + DefaultNodePath path = new DefaultNodePath().add(0).add(2); + + TreeNode oldRoot = root; + + DefaultTreeEditor currentEditor = editor; + String key = "path"; + + + TreeNode currentRoot = root; + for (DefaultNodePath part : path.inits()) { + String str = part.toString(); + ByteBuffer value = ByteBuffer.wrap(str.getBytes()); + PutAttribute putAttribute = new PutAttribute(key, value); + Either<Error, LoggingNode> either = currentEditor.edit(currentRoot, part, putAttribute); + if (either.isA()) { + Assert.fail(); + } + currentRoot = either.b().getWrap(); + } + + TreeNode newRoot = currentRoot; + DefaultTraverser traverser = new DefaultTraverser(); + + for (DefaultNodePath part : path.inits()) { + Either<Error, Traversal> either = traverser.traverse(newRoot, new DefaultEvaluator(part)); + if (either.isA()) { + Assert.fail(); + } + TreeNode target = either.b().destination(); + String expected = part.toString(); + String actual = new String(target.getAttributes().get(key).array()); + + Assert.assertEquals(expected, actual); + } + for (DefaultNodePath part : path.inits()) { + Either<Error, Traversal> either = traverser.traverse(oldRoot, new DefaultEvaluator(part)); + if (either.isA()) { + Assert.fail(); + } + TreeNode target = either.b().destination(); + ByteBuffer actual = target.getAttributes().get(key); + + Assert.assertNull(actual); + } + + } + + public void testEdit() { + DefaultTreeEditor instance = instance(); + DefaultTreeNode node = new DefaultTreeNode(); + DefaultNodePath path = new DefaultNodePath(); + + Either<Error, LoggingNode> either = instance.edit(node, path, new AppendChildAt(0)); + if (either.isA()) { + Assert.fail(); + } + TreeNode newRoot = either.b().getWrap(); + Assert.assertEquals(1, newRoot.getChildren().size()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/AppendChildAtTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,27 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core.nodeeditor; + + +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.store.impl.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import junit.framework.TestCase; + +public class AppendChildAtTest extends TestCase +{ + public void testEdit() + { + TreeNode node = new DefaultTreeNode(); + AppendChildAt op = new AppendChildAt(0); + Either<Error, LoggingNode> either = op.edit(node); + if(either.isA()){ + Assert.fail(); + } + + LoggingNode newNode = either.b(); + Assert.assertEquals(1,newNode.getChildren().size()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteAttributeAtTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,37 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core.nodeeditor; + +import java.nio.ByteBuffer; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import junit.framework.TestCase; + +public class DeleteAttributeAtTest extends TestCase +{ + public void testEdit() + { + String key = "KEY"; + ByteBuffer value = ByteBuffer.wrap(key.getBytes()); + + TreeNode node = new DefaultTreeNode(); + Either<Error,TreeNode> either = node.getAttributes().put(key, value); + if(either.isA()){ + Assert.fail(); + } + node = either.b(); + + DeleteAttribute op = new DeleteAttribute(key); + Either<Error,LoggingNode> either2 = op.edit(node); + if(either2.isA()){ + Assert.fail(); + } + LoggingNode newNode = either2.b(); + ByteBuffer ret = newNode.getAttributes().get(key); + Assert.assertNull(ret); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteChildAtTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,33 @@ +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.store.impl.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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import junit.framework.TestCase; + +public class DeleteChildAtTest extends TestCase +{ + public void testEdit() + { + TreeNode node = new DefaultTreeNode(); + Either<Error,TreeNode> either = node.getChildren().addNewChildAt(0); + if(either.isA()){ + Assert.fail(); + } + node = either.b(); + Assert.assertEquals(1,node.getChildren().size()); + + DeleteChildAt op = new DeleteChildAt(0); + Either<Error,LoggingNode> either2 = op.edit(node); + if(either2.isA()){ + Assert.fail(); + } + LoggingNode logNode = either2.b(); + + Assert.assertEquals(0,logNode.getChildren().size()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/EditableAttributesTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,99 @@ +/*package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.nodeeditor; + +import java.nio.ByteBuffer; + +import org.junit.Assert; + +import fj.P; +import fj.P2; +import fj.data.List; +import TreeNode; +import TreeNodeAttributes; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableAttributes; +import NodeEditorError; +import Either; +import Error; +import junit.framework.TestCase; + +public abstract class EditableAttributesTest<T extends TreeNode<T>> extends TestCase +{ + public abstract TreeNodeAttributes<T> instance(); + + @SuppressWarnings("unchecked") + public static final List<P2<String,ByteBuffer>> ENTRIES = List.list( + P.p("KEY1",ByteBuffer.wrap("VALUE1".getBytes())), + P.p("KEY2",ByteBuffer.wrap("VALUE2".getBytes())), + P.p("KEY3",ByteBuffer.wrap("VALUE3".getBytes())) + ); + + public TreeNodeAttributes<T> createTestData() + { + TreeNodeAttributes<T> instance = instance(); + + T node; + TreeNodeAttributes<T> attr = instance; + for(P2<String,ByteBuffer> entry : ENTRIES){ + Either<Error,T> either = attr.put(entry._1(),entry._2()); + if(either.isA()){ + Assert.fail("error during creating the data."); + } + + node = either.b(); + attr = node.getAttributes(); + } + + return attr; + } + + public void testPutDoesNotAcceptNullValue() + { + TreeNodeAttributes<T> instance = instance(); + + Either<Error,T> either = instance.put("KEY",null); + if(!either.isA()){ + Assert.fail("put must returns NULL_VALUE_NOT_ALLOWED when the value was null."); + } + + Assert.assertEquals(NodeEditorError.NULL_VALUE_NOT_ALLOWED,either.a()); + + either = instance.put(null,ByteBuffer.wrap("VALUE".getBytes())); + + if(!either.isA()){ + Assert.fail("put must returns NULL_VALUE_NOT_ALLOWED when the key was null."); + } + + Assert.assertEquals(NodeEditorError.NULL_VALUE_NOT_ALLOWED,either.a()); + } + + public void testPut() + { + createTestData(); + } + + public void testDeleteIfKeyExsist() + { + TreeNodeAttributes<T> attr = createTestData(); + + for(P2<String,ByteBuffer> entry : ENTRIES){ + Either<Error,T> either = attr.delete(entry._1()); + if(either.isA()){ + Assert.fail("error during deleting exist key."); + } + + attr = either.b().getAttributes(); + } + } + + public static final String DUMMY_KEY = "dummy"; + + public void testDeleteIfKeyNotExist() + { + TreeNodeAttributes<T> attr = createTestData(); + + Either<Error,T> either = attr.delete(DUMMY_KEY); + if(!either.isA()){ + Assert.fail("delete must returns DELETE_KEY_NOT_FOUND when the deleting invalid key."); + } + } +} +*/ \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/EditableChildrenTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,135 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core.nodeeditor; + +import java.nio.ByteBuffer; +/*import org.junit.Assert; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableChildren; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableNode; +import NodeEditorError; +import Either; +import Error; +import junit.framework.TestCase; + +public abstract class EditableChildrenTest<T extends EditableNode<T>> extends TestCase +{ + public abstract EditableChildren<T> instance(); + + public static final String KEY = "KEY"; + public static final ByteBuffer VALUE = ByteBuffer.wrap("VALUE".getBytes()); + + public void testAddNewChildAtMuinusValue() + { + EditableChildren<T> children = instance(); + Either<Error,T> either = children.addNewChildAt(-1); + if(!either.isA()){ + Assert.fail("addNewChildAt(-1) must returns INDEX_OUT_OF_BOUNDS Error"); + } + + Error e = either.a(); + Assert.assertSame(e,NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + public void testAddNewChildAtOutOfBounds() + { + EditableChildren<T> children = instance(); + Either<Error,T> either = children.addNewChildAt(1); + if(!either.isA()){ + Assert.fail("addNewChildAt(1) must returns INDEX_OUT_OF_BOUNDS Error"); + } + + Error e = either.a(); + Assert.assertSame(e,NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + public void testAddNewChildAtMiddle() + { + EditableChildren<T> children = instance(); + + for(int i = 0;i < 3;i ++){ + Either<Error,T> either = children.addNewChildAt(0); + if(either.isA()){ + Assert.fail("fail when adding new child to head"); + } + children = either.b().getChildren(); + } + + Either<Error, T> either = children.addNewChildAt(1); + if(either.isA()){ + Assert.fail("fail when adding new child to middle (1)"); + } + // size must be 4 + children = either.b().getChildren(); + Assert.assertEquals(4,children.size()); + } + + public void testAddNewChildAtToHead() + { + EditableChildren<T> children = instance(); + + int size = children.size(); + + Either<Error,T> either = children.addNewChildAt(0); + if(either.isA()){ + Assert.fail("error during add new child to head"); + } + children = either.b().getChildren(); + Assert.assertEquals(size + 1,children.size()); + } + + public void testDeleteChildAtMuinusValue() + { + EditableChildren<T> children = instance(); + Either<Error,T> either = children.deleteChildAt(-1); + if(!either.isA()){ + Assert.fail("deleteChildAt(-1) must returns INDEX_OUT_OF_BOUNDS Error"); + } + + Error e = either.a(); + Assert.assertSame(e,NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + public void testDeleteChildAtOutOfBounds() + { + EditableChildren<T> children = instance(); + Either<Error,T> either = children.deleteChildAt(1); + if(!either.isA()){ + Assert.fail("deleteChildAt(1) must returns INDEX_OUT_OF_BOUNDS Error"); + } + + Error e = either.a(); + Assert.assertSame(e,NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + public void testDeleteChildAtFailsWhenTheSizeIsZero() + { + EditableChildren<T> children = instance(); + Either<Error,T> either = children.deleteChildAt(0); + if(!either.isA()){ + Assert.fail("deleteChildAt(1) must returns INDEX_OUT_OF_BOUNDS Error"); + } + + Error e = either.a(); + Assert.assertSame(e,NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + public void testDeleteChildAt() + { + EditableChildren<T> children = instance(); + + int size = children.size(); + + Either<Error,T> either = children.addNewChildAt(0); + if(either.isA()){ + Assert.fail("error during add new child to head"); + } + children = either.b().getAttributes().put(KEY,VALUE).b().getChildren(); + Assert.assertEquals(size + 1,children.size()); + + either = children.deleteChildAt(0); + if(either.isA()){ + Assert.fail("error during deleting child"); + } + children = either.b().getChildren(); + + Assert.assertEquals(size,children.size()); + } +}*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/PutAttributeTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,33 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core.nodeeditor; + +import java.nio.ByteBuffer; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.util.Either; +import org.junit.Assert; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.TestCase; + +public class PutAttributeTest extends TestCase +{ + public void testEdit() + { + String key = "KEY"; + ByteBuffer value = ByteBuffer.wrap(key.getBytes()); + TreeNode node = new DefaultTreeNode(); + PutAttribute op = new PutAttribute(key,value); + //EditableNodeWrapper<DefaultTreeNode> wrapper = new EditableNodeWrapper<DefaultTreeNode>(node); + Either<Error, LoggingNode> either = op.edit(node); + if(either.isA()){ + Assert.fail(); + } + + LoggingNode newNode = either.b(); + ByteBuffer ret = newNode.getAttributes().get(key); + Assert.assertEquals(0,ret.compareTo(value)); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/ReplaceRootNodeAt.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,38 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.core.nodeeditor; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; + +import org.junit.Test; + +public class ReplaceRootNodeAt { + + @Test + public void ReplaceRootNodeAtTest() { + Jungle jungle = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("tree"); + JungleTree tree = jungle.getTreeByName("tree"); + JungleTreeEditor editor = tree.getTreeEditor(); + + TreeNode oldRoot = tree.getRootNode(); + Either<Error, JungleTreeEditor> either = editor.replaceNewRootNode(); + Assert.assertTrue(either.isB()); + JungleTreeEditor newTreeEditor = either.b(); + Assert.assertTrue(newTreeEditor.success().isB()); + TreeNode newRoot = tree.getRootNode(); + Assert.assertFalse(oldRoot.equals(newRoot)); + + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> childrenEither = newRoot.getChildren().at(0); + Assert.assertTrue(childrenEither.isB()); + TreeNode newRootChildren = childrenEither.b(); + Assert.assertEquals(oldRoot, newRootChildren); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/treeeditor/TreeNodeChildrenTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,131 @@ +/*package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.treeeditor; + +import java.nio.ByteBuffer; +import org.junit.Assert; +import fj.data.List; +import TreeNode; +import TreeNodeChildren; +import Either; +import Error; +import junit.framework.TestCase; + +public abstract class TreeNodeChildrenTest<T extends TreeNode<T>> extends TestCase +{ + public abstract TreeNode<T> instance(); + + public void testAddNewChildAtWithNode() + { + int count = 5; + for(Integer pos : List.range(0,5)){ + _testAddNewChildAtWithNode(count,pos); + } + } + + public void _testAddNewChildAtWithNode(int _count,int _pos) + { + TreeNode<T> instance = instance(); + + Either<Error, T> either; + for(int i = 0;i < _count;i ++){ + either = instance.getChildren().addNewChildAt(0); + if(either.isA()){ + Assert.fail(); + } + instance = either.b(); + } + + TreeNode<T> newNode = instance.createNewNode(); + String key = "KEY"; + ByteBuffer value = ByteBuffer.wrap("VALUE".getBytes()); + + either = newNode.getAttributes().put(key,value); + if(either.isA()){ + Assert.fail(); + } + newNode = either.b(); + + either = instance.getChildren().addNewChildAt(_pos,newNode); + if(either.isA()){ + Assert.fail(); + } + instance = either.b(); + + // check + either = instance.getChildren().at(_pos); + if(either.isA()){ + Assert.fail(); + } + + T checkTarget = either.b(); + ByteBuffer actual = checkTarget.getAttributes().get(key); + Assert.assertEquals(0,value.compareTo(actual)); + } + + public void testReplaceAt() + { + int count = 5; + for(Integer pos : List.range(0,count)){ + _testReplaceAt(count,pos); + } + } + + public void _testReplaceAt(int _count,int _pos) + { + TreeNode<T> instance = instance(); + String key = "KEY"; + ByteBuffer value = ByteBuffer.wrap("VALUE".getBytes()); + + // prepare + + for(int i = 0;i < _count;i ++){ + TreeNode<T> newNode = instance.createNewNode(); + Either<Error,T> either = newNode.getAttributes().put(key,value); + if(either.isA()){ + Assert.fail("failed to put attributes to child"); + } + + newNode = either.b(); + either = instance.getChildren().addNewChildAt(0,newNode); + if(either.isA()){ + Assert.fail("failed to add child to instance"); + } + + instance = either.b(); + } + + int size = instance.getChildren().size(); + Assert.assertEquals(_count,size); + + // create node for replacement. + + ByteBuffer replaceNodeValue = ByteBuffer.wrap("EULAV".getBytes()); + TreeNode<T> replacement = instance.createNewNode(); + Either<Error,T> either = replacement.getAttributes().put(key,replaceNodeValue); + if(either.isA()){ + Assert.fail("failed to create replacement node"); + } + replacement = either.b(); + + // replace + + either = instance.getChildren().replaceNode(_pos,replacement); + if(either.isA()){ + Assert.fail("failed to replace node."); + } + instance = either.b(); + + TreeNodeChildren<T> children = instance.getChildren(); + for(Integer pos : List.range(0,_count)){ + either = children.at(pos.intValue()); + if(either.isA()){ + Assert.fail("failed to get node."); + } + + T ch = either.b(); + ByteBuffer expect = (_pos != pos) ? value : replaceNodeValue; + ByteBuffer actual = ch.getAttributes().get(key); + + Assert.assertEquals(0,expect.compareTo(actual)); + } + } +}*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultAttributesTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,54 @@ +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.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.data.treemap.TreeMap; +import org.junit.Assert; + +import java.nio.ByteBuffer; +import java.util.Optional; + +public class DefaultAttributesTest extends AttributesTest +{ + public TreeNodeAttributes instance() + { + List<TreeNode> rawList = new List(); + TreeMap<String,ByteBuffer> rawMap = new TreeMap(); + + // add attributes + + for(Pair<String, ByteBuffer> entry : ENTRIES){ + rawMap = rawMap.put(entry.left(),entry.right()); + } + + TreeNode node = new DefaultTreeNode(rawList,rawMap); + return node.getAttributes(); + } + + public void testGetAttributesAsRawMap() + { + TreeNodeAttributes attrs = instance(); + TreeMap<String,ByteBuffer> rawMap = attrs.getAttributesAsRawMap(); + + // testing rawmap is not null. + Assert.assertNotNull(rawMap); + + // testing rawmap has correct key values. + for(Pair<String,ByteBuffer> entry : ENTRIES){ + String key = entry.left(); + ByteBuffer value = entry.right(); + + Optional<ByteBuffer> option = rawMap.get(key); + if(!option.isPresent()){ + Assert.fail(); + } + + ByteBuffer actual = option.get(); + Assert.assertEquals(0,actual.compareTo(value)); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultChildrenTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,44 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.impl.node; + + +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.data.treemap.TreeMap; +import org.junit.Assert; + +import java.nio.ByteBuffer; + +public class DefaultChildrenTest extends ChildrenTest<TreeNode> +{ + + @Override + public DefaultTreeNodeChildren instance() + { + List<TreeNode> rawList = new List(); + for(int i = 0;i < expectSize();i ++){ + rawList = rawList.addLast(new DefaultTreeNode()); + } + + TreeMap<String,ByteBuffer> rawMap = new TreeMap(); + + return new DefaultTreeNode(rawList,rawMap).getChildren(); + } + + @Override + public int expectSize() + { + return 3; + } + + public void testGetChildrenAsRawList() + { + DefaultTreeNodeChildren instance = instance(); + List<TreeNode> rawList = instance.getChildrenAsRawList(); + + Assert.assertNotNull(rawList); + Assert.assertEquals(expectSize(),rawList.length()); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/index/parentIndexTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,47 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.index; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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; +import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; +import junit.framework.Assert; +import org.junit.Test; + +import java.nio.ByteBuffer; + +/** + * Created by e115731 on 15/05/06. + */ +public class parentIndexTest { + @Test + public void parentIndex() { + Jungle jungle = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("tree"); + JungleTree tree = jungle.getTreeByName("tree"); + JungleTreeEditor editor = tree.getTreeEditor(); + + DefaultNodePath path = new DefaultNodePath(); + for (int count = 0; count < 100; count++) { + editor = editor.addNewChildAt(path, 0).b(); + path = path.add(0); + editor = editor.putAttribute(path, "KEY", ByteBuffer.wrap(("data" + count).getBytes())).b(); + } + + Either<Error, JungleTreeEditor> either = editor.success(); + Assert.assertTrue(either.isB()); + TreeNode node = tree.getNodeOfPath(path).b(); + ParentIndex parentIndex = tree.getParentIndex(); + for (int count = 99; count >= 0; count--) { + String attribute = node.getAttributes().getString("KEY"); + Assert.assertEquals(attribute, "data" + count); + node = parentIndex.get(node); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/tests/util/TestUtil.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,44 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.tests.util; + +import java.nio.ByteBuffer; + +import org.junit.Ignore; + +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +@Ignore +public class TestUtil +{ + public static TreeNode createMockTree(int _maxDepth) + { + return _createMockTree(1,_maxDepth,new DefaultNodePath()); + } + + public static TreeNode _createMockTree(int _currentDepth,int _maxDepth,NodePath _path) + { + TreeNode parent = new DefaultTreeNode(); + Either<Error, TreeNode> either = parent.getAttributes().put("KEY",ByteBuffer.wrap(_path.toString().getBytes())); + if(either.isA()){ + return null; + } + parent = either.b(); + + if(_currentDepth != _maxDepth){ + for(int i = 0;i <= _currentDepth;i ++){ + TreeNode ch = _createMockTree(_currentDepth + 1,_maxDepth,_path.add(i)); + either = parent.getChildren().addNewChildAt(i,ch); + if(either.isA()){ + return null; + } + parent = either.b(); + } + } + + return parent; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/traverse/InterfaceTraverserTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,143 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverse; + +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.JungleTree; +import jp.ac.u_ryukyu.ie.cr.jungle.JungleTreeEditor; +import jp.ac.u_ryukyu.ie.cr.jungle.persistent.NullJournal; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultNodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.DefaultTreeEditor; +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.traverser.DefaultTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import org.junit.Test; + +import java.nio.ByteBuffer; +import java.util.Iterator; + +/** + * Created by e115731 on 15/08/11. + */ +public class InterfaceTraverserTest { + public static int encount = 101; + public static double sum = 0d; + @Test + public void InterfaseTraverserTest() { + for (int i = 0; i < encount; i++) { + int start = (int) System.nanoTime(); + Jungle jungle = new DefaultJungle(new NullJournal(), "hoge", new DefaultTreeEditor(new DefaultTraverser())); + jungle.createNewTree("TestTree"); + JungleTree tree = jungle.getTreeByName("TestTree"); + JungleTreeEditor editor = tree.getTreeEditor(); + editor = createTree(editor, 0, 3, new DefaultNodePath()); + Either<Error, JungleTreeEditor> either = editor.success(); + if (either.isA()) + Assert.fail(); + int end = (int) System.nanoTime(); + if(i != 0) { + sum += (end - start) / 1000000f; + + System.out.println("Time sum : " + ((end - start) / 1000000f) + "ms"); + } + // System.out.println("Time : " + (end - start) / 1000000f + "ms"); + } + System.out.println("Sum Time : " + sum / (encount -1) + "ms"); +// InterfaceTraverser traverser = tree.getTraverser(true); +// +// { +// Iterator<TreeNode> iterator = traverser.find((TreeNode node) -> { // no index find +// String value = node.getAttributes().getString(key); +// if (value == null) +// return false; +// if (value.equals("<1,1,-1>")) +// return true; +// return false; +// }, null, null); +// +// Assert.assertTrue(iterator.hasNext()); +// TreeNode node = iterator.next(); +// String value = node.getAttributes().getString("KEY"); +// Assert.assertEquals("<1,1,-1>", value); +// } +// +// { +// Iterator<TreeNode> iterator = traverser.find((TreeNode node) -> { // no index find +// String value = node.getAttributes().getString(key); +// if (value == null) +// return false; +// if (value.equals("no exist value")) +// return true; +// return false; +// }, null, null); +// +// Assert.assertFalse(iterator.hasNext()); +// } +// +// { +// Iterator<TreeNode> iterator = traverser.find((TreeNode node) -> { // use index find +// String value = node.getAttributes().getString(key); +// if (value == null) +// return false; +// if (value.equals("<1,1,-1>")) +// return true; +// return false; +// }, indexKey, "<1,1,-1>+ index"); +// +// Assert.assertTrue(iterator.hasNext()); +// TreeNode node = iterator.next(); +// String value = node.getAttributes().getString("KEY"); +// Assert.assertEquals("<1,1,-1>", value); +// } +// +// { +// Iterator<TreeNode> iterator = traverser.find((TreeNode node) -> { // use index find +// String value = node.getAttributes().getString(key); +// if (value == null) +// return false; +// if (value.equals("<1,1,-1>")) +// return true; +// return false; +// }, indexKey, "no exist index value"); +// +// Assert.assertFalse(iterator.hasNext()); +// } + + } + + public static String key = "KEY"; + public static String indexKey = "INDEXKEY"; + public static DefaultTreeNode factory = new DefaultTreeNode(); + public static ByteBuffer value = ByteBuffer.wrap(key.getBytes()); + + public JungleTreeEditor createTree(JungleTreeEditor editor, int _curY, int _maxHeight, NodePath path) { + + if (_curY == _maxHeight) { + return editor; + } + for (int i = 0; i < 3; i++) { + + Either<Error, JungleTreeEditor> either = editor.addNewChildAt(path, i); + if (either.isA()) + Assert.fail(); + editor = either.b(); + // String value = path.add(i).toString(); + either = editor.putAttribute(path.add(i), key, value); + if (either.isA()) + Assert.fail(); + editor = either.b(); + // String value2 = value + "+ index"; + either = editor.putAttribute(path.add(i), indexKey, value); + if (either.isA()) + Assert.fail(); + editor = either.b(); + editor = createTree(editor, _curY + 1, _maxHeight, path.add(i)); + } + return editor; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/traverse/TraverserTest.java Wed Nov 30 01:47:55 2016 +0900 @@ -0,0 +1,100 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverse; + + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.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.traverser.*; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import junit.framework.Assert; +import junit.framework.TestCase; + +import java.nio.ByteBuffer; + +public class TraverserTest extends TestCase +{ + + public void testTraverse() + { + int maxHeight = 3; + + TreeNode root = createTree(0,maxHeight,new DefaultNodePath()); + Traverser traverser = new DefaultTraverser(); + + List<DefaultNodePath> paths = generatePathPattern(new DefaultNodePath(),0,maxHeight); + paths = paths.addLast(new DefaultNodePath()); + + for(DefaultNodePath path : paths){ + DefaultEvaluator evaluator = new DefaultEvaluator(path); + Either<Error,Traversal> ret = traverser.traverse(root,evaluator); + if(ret.isA()){ + Assert.fail(); + } + + Traversal traversal = ret.b(); + TreeNode target = traversal.destination(); + String expect = path.toString(); + ByteBuffer value = target.getAttributes().get(key); + String actual = new String(value.array()); + Assert.assertEquals(expect,actual); + + List<DefaultNodePath> parts = path.inits(); + + for(Direction<TreeNode> d : traversal){ + DefaultNodePath part = parts.tail(); + parts = parts.delete(parts.length() - 1); + value = d.getTarget().getAttributes().get(key); + String actualCurrentPathStr = new String(value.array()); + String expectCurrentPathStr = part.toString(); + Assert.assertEquals(expectCurrentPathStr,actualCurrentPathStr); + } + } + } + + public List<DefaultNodePath> generatePathPattern(DefaultNodePath _cur,int _curHeight,int _maxHeight) + { + List<DefaultNodePath> paths = new List(); + for(int p = 0;p <= _curHeight;p ++){ + DefaultNodePath path = _cur.add(p); + if(_curHeight != _maxHeight - 1){ + List<DefaultNodePath> newpaths = generatePathPattern(path,_curHeight+1,_maxHeight); + paths = paths.append(newpaths); + } + paths = paths.addLast(path); + } + + return paths; + } + + public static String key = "KEY"; + public static DefaultTreeNode factory = new DefaultTreeNode(); + + public TreeNode createTree(int _curY,int _maxHeight,NodePath _address) + { + TreeNode parent = factory.createNewNode(); + Either<Error,TreeNode> either = parent.getAttributes().put(key,ByteBuffer.wrap(_address.toString().getBytes())); + if(either.isA()){ + Assert.fail(); + } + parent = either.b(); + + if(_curY == _maxHeight){ + return parent; + } + + for(int i = 0;i < _curY + 1;i ++){ + TreeNode ch = createTree(_curY + 1,_maxHeight,_address.add(i)); + either = parent.getChildren().addNewChildAt(i,ch); + if(either.isA()){ + Assert.fail(); + } + + parent = either.b(); + } + + return parent; + } +}