public class JsonDataSource<T extends Output<T>> extends ColumnarDataSource<T>
DataSource
for loading data from a JSON text file
and applying FieldProcessor
s to it.Modifier and Type | Class and Description |
---|---|
static class |
JsonDataSource.JsonDataSourceProvenance
Provenance for
JsonDataSource . |
outputRequired, rowProcessor
Constructor and Description |
---|
JsonDataSource(Path dataPath,
RowProcessor<T> rowProcessor,
boolean outputRequired)
Creates a JsonDataSource using the specified RowProcessor to process the data.
|
JsonDataSource(URI dataFile,
RowProcessor<T> rowProcessor,
boolean outputRequired)
Creates a JsonDataSource using the specified RowProcessor to process the data.
|
Modifier and Type | Method and Description |
---|---|
ConfiguredDataSourceProvenance |
getProvenance() |
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
ColumnarIterator |
rowIterator()
The iterator that emits
ColumnarIterator.Row objects from the
underlying data source. |
String |
toString() |
getMetadataTypes, getOutputFactory, iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public JsonDataSource(Path dataPath, RowProcessor<T> rowProcessor, boolean outputRequired)
dataPath
- The Path to the data file.rowProcessor
- The row processor which converts a row into an Example
.outputRequired
- Is the output required to exist in the data file.public JsonDataSource(URI dataFile, RowProcessor<T> rowProcessor, boolean outputRequired)
dataFile
- A URI for the data file.rowProcessor
- The row processor which converts a row into an Example
.outputRequired
- Is the output required to exist in the data file.public void postConfig()
public ColumnarIterator rowIterator()
ColumnarDataSource
ColumnarIterator.Row
objects from the
underlying data source.rowIterator
in class ColumnarDataSource<T extends Output<T>>
public ConfiguredDataSourceProvenance getProvenance()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.