org.maskat.core.node
クラス TableNode

java.lang.Object
  上位を拡張 org.maskat.core.node.TableNode
すべての実装されたインタフェース:
Node

public class TableNode
extends java.lang.Object
implements Node

テーブルノード

 テーブル構造を表現するノード。
 sampleTable
 |    |col1|col2|col3|
 |row1|   1|   4|   7|
 |row2|   2|   5|   8|
 |row3|   3|   6|   9|
 を表現する場合、
 
 TableNode table = new TableNode("sampleTable");
 table.newRow("row1").add("col1", "1").add("col2", "4").add("col3", "7");
 table.newRow("row1").add("col1", "2").add("col2", "5").add("col3", "8");
 table.newRow("row1").add("col1", "3").add("col2", "6").add("col3", "9");
 
 とする。
 また上記は
 
 TableNode table = new TableNode("sampleTable");
 table.newRow("row1");
 table.add("col1", "1");
 table.add("col2", "4");
 table.add("col3", "7");
 table.newRow("row1");
 table.add("col1", "2");
 table.add("col2", "5");
 table.add("col3", "8");
 table.newRow("row1");
 table.add("col1", "3");
 table.add("col2", "6");
 table.add("col3", "9");
 
 と等価。
 


コンストラクタの概要
TableNode(java.lang.String tableName)
          コンストラクタ
 
メソッドの概要
 TableNode add(java.lang.String colName, java.lang.String value)
          新規カラム作成 このメソッド呼び出しに先駆けてnewRow()を呼び出すこと。
 java.lang.String getXML()
          XML文字列の取得
 TableNode newRow(java.lang.String rowName)
          新規行作成
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TableNode

public TableNode(java.lang.String tableName)
コンストラクタ

パラメータ:
tableName - テーブル名
メソッドの詳細

newRow

public TableNode newRow(java.lang.String rowName)
新規行作成

パラメータ:
rowName - 行名
戻り値:
this

add

public TableNode add(java.lang.String colName,
                     java.lang.String value)
新規カラム作成
 このメソッド呼び出しに先駆けてnewRow()を呼び出すこと。
 

パラメータ:
colName - カラム名
value - カラム値
戻り値:
this

getXML

public java.lang.String getXML()
インタフェース Node の記述:
XML文字列の取得

定義:
インタフェース Node 内の getXML
戻り値:
XML文字列