public class FileDataset extends AbstractDataset
File dataset
AbstractDataset.Instance
IDataset.IInstance
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
fileName
Data file name
|
protected java.io.Reader |
fileReader
Data file reader
|
cursorInstance, cursorPosition, metadata, name
Constructor and Description |
---|
FileDataset()
Empty constructor
|
FileDataset(java.lang.String fileName)
Constructor that receives the name of the file to be opened
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close dataset
|
void |
configure(Configuration settings)
Configuration method
Configuration parameters for ArrayDataset are:
|
java.lang.String |
getFileName()
Gets the file name
|
boolean |
move(int index)
Move cursor to index position
|
boolean |
next()
Return the next instance
|
void |
open()
Open dataset
|
IDataset.IInstance |
read()
Returns cursor instance
|
void |
reset()
Reset dataset
|
void |
setFileName(java.lang.String fileName)
Sets the file name
|
getCursorPosition, getMetadata, getName, numberOfInstances, read, read, read, setName
protected java.lang.String fileName
protected java.io.Reader fileReader
public FileDataset()
Empty constructor
public FileDataset(java.lang.String fileName)
Constructor that receives the name of the file to be opened
fileName
- Name of the file to be openedpublic java.lang.String getFileName()
Gets the file name
public void setFileName(java.lang.String fileName)
Sets the file name
fileName
- The name of the file to be setpublic void open() throws DatasetException
Open dataset
open
in interface IDataset
open
in class AbstractDataset
DatasetException
- If dataset can't be openedpublic void close() throws DatasetException
Close dataset
close
in interface IDataset
close
in class AbstractDataset
DatasetException
- If dataset can't be closedpublic boolean move(int index) throws DatasetException
Move cursor to index position
move
in interface IDataset
move
in class AbstractDataset
index
- New cursor positionDatasetException
- if a source access error occurspublic boolean next() throws DatasetException
Return the next instance
next
in interface IDataset
next
in class AbstractDataset
DatasetException
- if a source access error occurspublic void reset() throws DatasetException
Reset dataset
reset
in interface IDataset
reset
in class AbstractDataset
DatasetException
- if a source access error occurspublic IDataset.IInstance read() throws DatasetException
Returns cursor instance
DatasetException
- if a source access error occurspublic void configure(Configuration settings)
Configuration method Configuration parameters for ArrayDataset are:
settings
- Configuration object to read the parameters