Package org.openrefine.importers
Class InputStreamImporter
- java.lang.Object
-
- org.openrefine.importers.ImportingParserBase
-
- org.openrefine.importers.InputStreamImporter
-
- All Implemented Interfaces:
ImportingParser
- Direct Known Subclasses:
ExcelImporter,LegacyProjectImporter,OdsImporter
public abstract class InputStreamImporter extends ImportingParserBase
A base class for importers which read their files in binary mode (as anInputStream).
-
-
Constructor Summary
Constructors Constructor Description InputStreamImporter()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract GridparseOneFile(Runner runner, ProjectMetadata metadata, ImportingJob job, String fileSource, String archiveFileName, Supplier<InputStream> inputStream, long limit, com.fasterxml.jackson.databind.node.ObjectNode options)Parses one file, read from anInputStreamobject, into a Grid.-
Methods inherited from class org.openrefine.importers.ImportingParserBase
createParserUIInitializationData, parse, parseOneFile
-
-
-
-
Method Detail
-
parseOneFile
public abstract Grid parseOneFile(Runner runner, ProjectMetadata metadata, ImportingJob job, String fileSource, String archiveFileName, Supplier<InputStream> inputStream, long limit, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
Parses one file, read from anInputStreamobject, into a Grid.- 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 donefileSource- the path or source of the file (could be "clipboard" or a URL as well)archiveFileName- the path or source of the archive which contained this fileinputStream- the input stream where to read the data fromlimit- the maximum number of rows to readoptions- any options passed to the importer as a JSON payload- Returns:
- a parsed Grid
- Throws:
Exception
-
-