Interface WritableTabularDataSource
- All Known Implementing Classes:
CSVFileStoreConnector
,PostgresTabularDataSourceConnector
,ValidValueDataSetConnector
public interface WritableTabularDataSource
WritableTabularDataSource defines the specific connector api for working with
simple tabular data. Each row represents a record
that is divided into columns. Each row has the same list of columns and so the data source is
effectively a table of data.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendRecord
(List<String> dataValues) Write the requested data record to the end of the data source.void
deleteRecord
(long rowNumber) Remove the requested data record.long
Return the number of records in the data source.void
setColumnDescriptions
(List<TabularColumnDescription> columnDescriptions) Set up the columns associated with this tabular data source.void
setTableName
(String tableName, String tableDescription) Set up the canonical table name for this data source.void
writeRecord
(long rowNumber, List<String> dataValues) Write the requested data record.
-
Method Details
-
getRecordCount
Return the number of records in the data source.- Returns:
- count
- Throws:
ConnectorCheckedException
- there is a problem accessing the data
-
setTableName
Set up the canonical table name for this data source. Each word in the name should be capitalized, with spaces between the words to allow translation between different naming conventions.- Parameters:
tableName
- stringtableDescription
- optional description- Throws:
ConnectorCheckedException
- there is a problem accessing the data
-
setColumnDescriptions
void setColumnDescriptions(List<TabularColumnDescription> columnDescriptions) throws ConnectorCheckedException Set up the columns associated with this tabular data source. These may be stored in the data set or kept in memory for this instance. The names of the columns will be in a canonical format where each word in the name is capitalized with a space between each word. This allows simple translation between the naming conventions supported by different technologies.- Parameters:
columnDescriptions
- a list of column descriptions- Throws:
ConnectorCheckedException
- there is a problem accessing the data
-
writeRecord
Write the requested data record. The first data record is record 0.- Parameters:
rowNumber
- longdataValues
- Map of column descriptions to strings, each string is the value for the column.- Throws:
ConnectorCheckedException
- there is a problem accessing the data.
-
appendRecord
Write the requested data record to the end of the data source.- Parameters:
dataValues
- Map of column descriptions to strings, each string is the value for the column.- Throws:
ConnectorCheckedException
- there is a problem accessing the data.
-
deleteRecord
Remove the requested data record. The first data record is record 0.- Parameters:
rowNumber
- long- Throws:
ConnectorCheckedException
- there is a problem accessing the data.
-