public class TextDataSourceBuilder extends Object implements org.apache.commons.lang3.builder.Builder<DataSource>
| Constructor and Description |
|---|
TextDataSourceBuilder() |
TextDataSourceBuilder(File file) |
TextDataSourceBuilder(String name) |
| Modifier and Type | Method and Description |
|---|---|
TextDataSource |
build()
Build the data source.
|
String |
getDelimiter()
Get the input delimiter.
|
PreferenceDomain |
getDomain() |
File |
getFile()
Get the input file.
|
EventFormat |
getFormat()
Get the currently-configured event format.
|
int |
getHeaderLines()
Get the number of header lines that will be skipped.
|
File |
getItemFile()
Get the item file.
|
File |
getItemNameFile()
Get the item file.
|
String |
getName() |
TextDataSourceBuilder |
setDelimiter(String delim)
Set the input field delimiter.
|
TextDataSourceBuilder |
setDomain(PreferenceDomain dom)
Set the preference domain for the data source.
|
TextDataSourceBuilder |
setFile(File file)
Set the input file.
|
TextDataSourceBuilder |
setFile(String fn)
Set the input file by name.
|
TextDataSourceBuilder |
setFormat(EventFormat fmt)
Set the event format.
|
TextDataSourceBuilder |
setHeaderLines(int lines)
Set the number of header lines to skip.
|
TextDataSourceBuilder |
setItemFile(File file)
Set the item ID file.
|
TextDataSourceBuilder |
setItemNameFile(File file)
Set the item ID to name mapping file.
|
TextDataSourceBuilder |
setName(String n)
Set the data source name.
|
public TextDataSourceBuilder()
public TextDataSourceBuilder(String name)
public TextDataSourceBuilder(File file)
public TextDataSourceBuilder setName(String n)
n - The name of the data source.setFile(java.io.File)public File getFile()
public TextDataSourceBuilder setFile(File file)
setName(String)) is used
as the file name.file - The file to read ratings from.public TextDataSourceBuilder setFile(String fn)
fn - The input file name.public EventFormat getFormat()
public TextDataSourceBuilder setFormat(EventFormat fmt)
fmt - The format.public String getDelimiter()
public TextDataSourceBuilder setDelimiter(String delim)
delim - The input delimiter.IllegalStateException - if a format has been specified with setFormat(EventFormat).public int getHeaderLines()
public TextDataSourceBuilder setHeaderLines(int lines)
lines - The number of header lines to skip.public PreferenceDomain getDomain()
public TextDataSourceBuilder setDomain(PreferenceDomain dom)
dom - The preference domain.public File getItemFile()
public TextDataSourceBuilder setItemFile(File file)
file - The item file, if one is specified.public File getItemNameFile()
public TextDataSourceBuilder setItemNameFile(File file)
file - The item name file, if one is specified.public TextDataSource build()
setName(String) or
setFile(java.io.File) must be called prior to building.build in interface org.apache.commons.lang3.builder.Builder<DataSource>