Package org.openrefine.importers
Class XmlImporter
- java.lang.Object
-
- org.openrefine.importers.ImportingParserBase
-
- org.openrefine.importers.tree.TreeImportingParserBase
-
- org.openrefine.importers.XmlImporter
-
- All Implemented Interfaces:
ImportingParser
- Direct Known Subclasses:
MarcImporter
public class XmlImporter extends TreeImportingParserBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XmlImporter.XmlParser
-
Constructor Summary
Constructors Constructor Description XmlImporter()
-
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 archiveName, InputStream inputStream, 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
-
-
-
-
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 archiveName, InputStream inputStream, 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
-
-