Package fmpp.dataloaders
Class CsvDataLoader
- java.lang.Object
-
- fmpp.dataloaders.FileDataLoader
-
- fmpp.dataloaders.CsvDataLoader
-
- All Implemented Interfaces:
DataLoader
public class CsvDataLoader extends FileDataLoader
Data loaders that loads CSV (Column Separated Values) files or other files of similar formats (as tab divided text), and returns afmpp.models.CsvSequence
object.The format of the directive is:
csv(filename, option)
, where option is a hash of options, such as{encoding:'ISO-8859-3', separator:','}
. For the complete list of options please see the parameters ofCsvSequence
constructors.Note: This class should be an
AbstractTextDataLoader
subclass, but it is not that for backward compatibility.
-
-
Field Summary
-
Fields inherited from class fmpp.dataloaders.FileDataLoader
args, dataFile, engine
-
-
Constructor Summary
Constructors Constructor Description CsvDataLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
load(java.io.InputStream data)
FileDataLoader
subclasess override this method to parse the file.-
Methods inherited from class fmpp.dataloaders.FileDataLoader
load
-
-
-
-
Method Detail
-
load
protected java.lang.Object load(java.io.InputStream data) throws java.io.IOException, freemarker.template.TemplateModelException, StringUtil.ParseException
Description copied from class:FileDataLoader
FileDataLoader
subclasess override this method to parse the file.- Specified by:
load
in classFileDataLoader
- Throws:
java.io.IOException
freemarker.template.TemplateModelException
StringUtil.ParseException
-
-