Package org.openrefine.importing
Interface ImportingParser
-
- All Known Implementing Classes:
ExcelImporter
,FixedWidthImporter
,ImportingParserBase
,InputStreamImporter
,JsonImporter
,LegacyProjectImporter
,LineBasedImporter
,MarcImporter
,OdsImporter
,PCAxisImporter
,RdfJsonldTripleImporter
,RdfTripleImporter
,RdfXmlTripleImporter
,ReaderImporter
,SeparatorBasedImporter
,TreeImportingParserBase
,WikitextImporter
,XmlImporter
public interface ImportingParser
Interface for classes responsible for implementing support for an input format in OpenRefine. This parses one or more files into aGrid
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ObjectNode
createParserUIInitializationData(Runner runner, ImportingJob job, List<ImportingFileRecord> fileRecords, String format)
Create data sufficient for the parser UI on the client side to do its work.Grid
parse(Runner runner, ProjectMetadata metadata, ImportingJob job, List<ImportingFileRecord> fileRecords, String format, long limit, com.fasterxml.jackson.databind.node.ObjectNode options)
Main method of the parser: parse a grid out of input files
-
-
-
Method Detail
-
createParserUIInitializationData
com.fasterxml.jackson.databind.node.ObjectNode createParserUIInitializationData(Runner runner, ImportingJob job, List<ImportingFileRecord> fileRecords, String format)
Create 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.
-
parse
Grid parse(Runner runner, ProjectMetadata metadata, ImportingJob job, List<ImportingFileRecord> fileRecords, String format, long limit, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
Main method of the parser: parse a grid out of input files- Parameters:
runner
- the runner to use to create the gridmetadata
- the project metadata, to which the importer can contributejob
- the importing job, useful to report importing progressfileRecords
- the files to importformat
- the identifier for the formatlimit
- maximum number of rows to createoptions
- custom options put together by the UI corresponding to this parser, which the parser should understand- Throws:
Exception
-
-