public class FlatDtdDataSet extends AbstractDataSet implements IDataSetConsumer
_orderedTableNameMap
Constructor and Description |
---|
FlatDtdDataSet() |
FlatDtdDataSet(IDataSetProducer producer) |
FlatDtdDataSet(InputStream in) |
FlatDtdDataSet(Reader reader) |
Modifier and Type | Method and Description |
---|---|
protected ITableIterator |
createIterator(boolean reversed)
Creates an iterator which provides access to all tables of this dataset
|
void |
endDataSet()
Receive notification of the end of a dataset.
|
void |
endTable()
Receive notification of the end of a table.
|
ITable |
getTable(String tableName)
Returns the specified table.
|
ITableMetaData |
getTableMetaData(String tableName)
Returns the specified table metadata.
|
String[] |
getTableNames()
Returns names of tables in this dataset in proper sequence.
|
void |
row(Object[] values)
Receive notification of a table row.
|
void |
startDataSet()
Receive notification of the beginning of a dataset.
|
void |
startTable(ITableMetaData metaData)
Receive notification of the beginning of a table.
|
String |
toString() |
static void |
write(IDataSet dataSet,
OutputStream out)
Write the specified dataset to the specified output stream as DTD.
|
static void |
write(IDataSet dataSet,
Writer out)
Write the specified dataset to the specified writer as DTD.
|
createTableNameMap, getTables, isCaseSensitiveTableNames, iterator, reverseIterator
public FlatDtdDataSet()
public FlatDtdDataSet(InputStream in) throws DataSetException, IOException
DataSetException
IOException
public FlatDtdDataSet(Reader reader) throws DataSetException, IOException
DataSetException
IOException
public FlatDtdDataSet(IDataSetProducer producer) throws DataSetException
DataSetException
public static void write(IDataSet dataSet, OutputStream out) throws IOException, DataSetException
IOException
DataSetException
FlatDtdWriter
public static void write(IDataSet dataSet, Writer out) throws IOException, DataSetException
IOException
DataSetException
FlatDtdWriter
protected ITableIterator createIterator(boolean reversed) throws DataSetException
AbstractDataSet
createIterator
in class AbstractDataSet
reversed
- Whether the created iterator should be a reversed one or notITableIterator
DataSetException
public String[] getTableNames() throws DataSetException
IDataSet
getTableNames
in interface IDataSet
getTableNames
in class AbstractDataSet
DataSetException
public ITableMetaData getTableMetaData(String tableName) throws DataSetException
IDataSet
getTableMetaData
in interface IDataSet
getTableMetaData
in class AbstractDataSet
NoSuchTableException
- if dataset do not contains the specified
tableDataSetException
public ITable getTable(String tableName) throws DataSetException
IDataSet
getTable
in interface IDataSet
getTable
in class AbstractDataSet
NoSuchTableException
- if dataset do not contains the specified
tableDataSetException
public void startDataSet() throws DataSetException
IDataSetConsumer
startDataSet
in interface IDataSetConsumer
DataSetException
public void endDataSet() throws DataSetException
IDataSetConsumer
endDataSet
in interface IDataSetConsumer
DataSetException
public void startTable(ITableMetaData metaData) throws DataSetException
IDataSetConsumer
IDataSetConsumer.endDataSet()
event for every startTable
event (even when the table is empty).startTable
in interface IDataSetConsumer
metaData
- the table metadataDataSetException
public void endTable() throws DataSetException
IDataSetConsumer
endTable
in interface IDataSetConsumer
DataSetException
public void row(Object[] values) throws DataSetException
IDataSetConsumer
row
in interface IDataSetConsumer
values
- The row values.DataSetException
public String toString()
toString
in class AbstractDataSet
Copyright © 2002–2020. All rights reserved.