Package org.openrefine.importers
Class JsonImporter
- java.lang.Object
-
- org.openrefine.importers.ImportingParserBase
-
- org.openrefine.importers.tree.TreeImportingParserBase
-
- org.openrefine.importers.JsonImporter
-
- All Implemented Interfaces:
ImportingParser
public class JsonImporter extends TreeImportingParserBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonImporter.JSONTreeReader
-
Constructor Summary
Constructors Constructor Description JsonImporter()
-
Method Summary
All Methods Instance Methods Concrete 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.void
parseOneFile(TreeImportUtilities.ColumnIndexAllocator allocator, List<Row> rows, ProjectMetadata metadata, ImportingJob job, String fileSource, String archiveFileName, InputStream is, ImportColumnGroup rootColumnGroup, long limit, com.fasterxml.jackson.databind.node.ObjectNode options)
Parse a single file from an InputStream.-
Methods inherited from class org.openrefine.importers.tree.TreeImportingParserBase
parse, parseOneFile, parseOneFile
-
Methods inherited from class org.openrefine.importers.ImportingParserBase
parseOneFile
-
-
-
-
Field Detail
-
ANONYMOUS
public static final String ANONYMOUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createParserUIInitializationData
public com.fasterxml.jackson.databind.node.ObjectNode createParserUIInitializationData(Runner runner, ImportingJob job, List<ImportingFileRecord> fileRecords, String format)
Description copied from interface:ImportingParser
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.- Specified by:
createParserUIInitializationData
in interfaceImportingParser
- Overrides:
createParserUIInitializationData
in classTreeImportingParserBase
-
parseOneFile
public void parseOneFile(TreeImportUtilities.ColumnIndexAllocator allocator, List<Row> rows, ProjectMetadata metadata, ImportingJob job, String fileSource, String archiveFileName, InputStream is, ImportColumnGroup rootColumnGroup, long limit, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
Description copied from class:TreeImportingParserBase
Parse a single file from an InputStream. The default implementation just throws a NotImplementedException. Override in subclasses to implement.- Overrides:
parseOneFile
in classTreeImportingParserBase
- Throws:
Exception
-
-