public class TextResource extends ResourceWithTable
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected Resource |
config
テキストファイルリソースの設定情報
|
FIELD_NAME_PREFIX, TABLE_NAME_PREFIX| コンストラクタと説明 |
|---|
TextResource() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
add(VCRecord record,
String target,
int type)
レコードデータモデルに対してデータを追加します。
|
void |
beforeFirst()
リソースの参照を初期位置に戻します。
|
void |
close() |
protected Object |
convert(String target,
int type)
データをフィールドの型に合わせて変換します。
|
VCResultSet |
getDataSet(SearchCondition[] conditions,
boolean orsearch,
SortField[] sortfields)
指定された検索条件でデータセットを取得します。
|
protected String |
getDatePattern()
文字列をjava.util.Dateインスタンスに変換するためのフォーマット文字列を取得します。
|
TextField[] |
getFields()
このリソースが保持するフィールド定義を取得します。
|
int |
getMaxGroupingRecordCount()
リスト集計でグループ化を行った場合の、最大グループ数を取得します。
|
String |
getName()
リソース名を取得します。
|
protected BufferedReader |
getReader()
ファイルから1行ずつ読み込むためのリーダーを取得します。
|
protected String |
getRest(String[] values,
int index)
文字列の配列要素のうち、指定されたインデックス番号より後ろの要素を取り出して
結合して新しい文字列インスタンスとして取得します。 |
protected String |
getSeparator()
1行分のデータをフィールド単位で分割するためのセパレータ文字列を取得します。
|
protected boolean |
hasNextFile()
リソースパスにマッチする次の読み込み対象ファイルが存在するかどうかを調べます。
|
VCRecord |
readLine()
リソースから1レコード読み込みます。
|
void |
setConfig(Resource config)
設定情報をセットします。
|
protected void |
setNextStream()
リソースパスにマッチする次のファイルを一時ファイルディレクトリにコピーし、読み込みストリームとしてセットします。
|
createTable, isRelationWithTable, refreshprotected Resource config
public void beforeFirst()
throws VCResourceException
VCResourceVCResourceException - 処理に失敗したときスローされますpublic void close()
throws IOException
IOExceptionpublic VCResultSet getDataSet(SearchCondition[] conditions, boolean orsearch, SortField[] sortfields) throws VCResourceException
VCResourceconditions - 検索条件の配列orsearch - OR検索フラグsortfields - ソート列情報の配列VCResourceException - データ読み取り中にエラーが発生した場合にスローされますpublic TextField[] getFields()
VCResourcepublic int getMaxGroupingRecordCount()
VCResourcepublic String getName()
VCResourcepublic VCRecord readLine() throws VCResourceException
VCResourceVCResourceException - 処理に失敗したときスローされますpublic void setConfig(Resource config) throws FileResourceException
config - 設定ファイルの情報FileResourceException - リソースパスで示されたファイルが存在しない場合にスローされますprotected void add(VCRecord record, String target, int type)
record - レコードモデルインスタンスtarget - 追加するデータtype - フィールドのデータ型protected Object convert(String target, int type)
target - データtype - フィールドのデータ型protected String getDatePattern()
protected BufferedReader getReader()
protected String getRest(String[] values, int index)
values - 文字列配列index - インデックス番号protected String getSeparator()
protected boolean hasNextFile()
protected void setNextStream()
throws VCResourceException
VCResourceException - ストリームの取得に失敗したときにスローされますCopyright © 2012 NTT DATA INTRAMART CORPORATION