Package org.openrefine.importers
Class LineBasedImporter
- java.lang.Object
- 
- org.openrefine.importers.ImportingParserBase
- 
- org.openrefine.importers.ReaderImporter
- 
- org.openrefine.importers.LineBasedImporter
 
 
 
- 
- All Implemented Interfaces:
- ImportingParser
 
 public class LineBasedImporter extends ReaderImporter An importer which reads each line of a file as a row with a single string-valued cell containing the line.
- 
- 
Constructor SummaryConstructors Constructor Description LineBasedImporter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ObjectNodecreateParserUIInitializationData(Runner runner, ImportingJob job, List<ImportingFileRecord> fileRecords, String format)Create data sufficient for the parser UI on the client side to do its work.GridparseOneFile(Runner runner, ProjectMetadata metadata, ImportingJob job, String fileSource, String archiveFileName, Supplier<Reader> reader, long limit, com.fasterxml.jackson.databind.node.ObjectNode options)Parses one file, read from aReaderobject, into a Grid.- 
Methods inherited from class org.openrefine.importers.ImportingParserBaseparse, parseOneFile
 
- 
 
- 
- 
- 
Method Detail- 
createParserUIInitializationDatapublic com.fasterxml.jackson.databind.node.ObjectNode createParserUIInitializationData(Runner runner, ImportingJob job, List<ImportingFileRecord> fileRecords, String format) Description copied from interface:ImportingParserCreate data sufficient for the parser UI on the client side to do its work. For example, an XML parser UI would need to know some sample elements so it can let the user pick which the path to the record elements.- Specified by:
- createParserUIInitializationDatain interface- ImportingParser
- Overrides:
- createParserUIInitializationDatain class- ReaderImporter
 
 - 
parseOneFilepublic Grid parseOneFile(Runner runner, ProjectMetadata metadata, ImportingJob job, String fileSource, String archiveFileName, Supplier<Reader> reader, long limit, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception Description copied from class:ReaderImporterParses one file, read from aReaderobject, into a Grid.- Specified by:
- parseOneFilein class- ReaderImporter
- Parameters:
- runner- the runner to use (the returned Grid will be generated by it)
- metadata- the project metadata associated with the project to parse (which can be modified by the importer)
- job- the importing job where this import is being done
- fileSource- the path or source of the file (could be "clipboard" or a URL as well)
- archiveFileName- the path or source of the archive the file was extracted from
- reader- the reader object where to read the data from
- limit- the maximum number of rows to read
- options- any options passed to the importer as a JSON payload
- Returns:
- a parsed Grid
- Throws:
- Exception
 
 
- 
 
-