changeset 16:f5028ec67c38

wrote description for editor api
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Thu, 18 Jul 2013 09:46:01 +0900
parents ac82fd7e1ea1
children 2132391fcb65
files Paper/figures/destructive_tree.xbb Paper/figures/non_destructive_tree.xbb Paper/jssst.tex
diffstat 3 files changed, 42 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Paper/figures/destructive_tree.xbb	Thu Jul 18 07:11:43 2013 +0900
+++ b/Paper/figures/destructive_tree.xbb	Thu Jul 18 09:46:01 2013 +0900
@@ -4,5 +4,5 @@
 %%HiResBoundingBox: 0.000000 0.000000 404.000000 207.000000
 %%PDFVersion: 1.4
 %%Pages: 1
-%%CreationDate: Thu Jul 18 00:49:55 2013
+%%CreationDate: Thu Jul 18 09:29:39 2013
 
--- a/Paper/figures/non_destructive_tree.xbb	Thu Jul 18 07:11:43 2013 +0900
+++ b/Paper/figures/non_destructive_tree.xbb	Thu Jul 18 09:46:01 2013 +0900
@@ -4,5 +4,5 @@
 %%HiResBoundingBox: 0.000000 0.000000 459.000000 207.000000
 %%PDFVersion: 1.4
 %%Pages: 1
-%%CreationDate: Thu Jul 18 00:49:55 2013
+%%CreationDate: Thu Jul 18 09:29:39 2013
 
--- a/Paper/jssst.tex	Thu Jul 18 07:11:43 2013 +0900
+++ b/Paper/jssst.tex	Thu Jul 18 09:46:01 2013 +0900
@@ -196,9 +196,49 @@
 
 非破壊的木構造により, 木構造を編集しながら走査することが可能となる.
 
+
 \subsection{Jungle におけるデータ編集}
+木の編集は, 通常 Node を書き換えるため Node の API として提供されることが多いが, Jungle で
+は JungleTreeEditor を利用して行う. 
+JungleTree Editor には編集するためのいくつかのメソッドが用意されており, NodePath と
+呼ばれるルートノードからノードまでのマスを指定することでノードが編集される.
+NodePath は, ルートノードからスタートし, ノードの子供の場所を次々に指定していくことで編集対象
+のノードの場所を表す(図\ref{fig:nodepath}).
+
+\begin{figure}[htpb]
+  \begin{center}
+    \includegraphics[scale=0.50]{figures/nodepath.pdf}
+    \caption{NodePath}
+    \label{fig:nodepath}
+  \end{center}
+\end{figure}
 
+Tree 編集の API として次の4つが用意されている.
+\begin{itemize}
+\item \verb+addNewChildAt(NodePath _path,int _pos);+
+\item \verb+deleteChildAt(NodePath _path,int _pos);+
+\item \verb+putAttribute(NodePath _path,+\\
+\verb+String _key,ByteBuffer _value)+
+\item \verb+deleteAttribute(NodePath _path,String _key)+
+\end{itemize}
 
+\subsubsection{addNewChildAt}
+NodePath で指定された Node に子供となる Node を追加するAPIである.
+pos で指定された番号に子供として追加を行う.
+
+\subsubsection{deleteChildAt}
+NodePath と pos により指定される Node を削除する API である.
+
+\subsubsection{putAttribute}
+Node に attribute を追加する API である.
+文字列をキーにして ByteBuffer によりデータを保持する.
+
+\subsubsection{deleteAttribute}
+NodePath により指定される Node の attribute を削除する API である.
+削除する attribute は文字列のキーで指定する.
+
+\subsection{TreeOperationLog}
+Jungle ではこれら API を使用してデータの編集を行なっていく.