public class JsonSource
extends java.lang.Object
This is open source software released under the Apache 2.0 License
| Modifier and Type | Class | Description |
|---|---|---|
static class |
JsonSource.Options<R,C> |
The options for this source
|
| Constructor | Description |
|---|---|
JsonSource() |
| Modifier and Type | Method | Description |
|---|---|---|
private <R,C> com.d3x.morpheus.frame.DataFrame<R,C> |
createFrame(JsonSource.Options<R,C> options) |
Returns a newly created DataFrame from the contents that has been read from JSON
|
private java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap(com.d3x.morpheus.util.text.Formats formats) |
Returns the type apply from the formats
|
<R,C> com.d3x.morpheus.frame.DataFrame<R,C> |
read(java.io.File file) |
Returns a DataFrame loaded from JSON in the resource specified
|
<R,C> com.d3x.morpheus.frame.DataFrame<R,C> |
read(java.io.InputStream is) |
Returns a DataFrame loaded from JSON in the resource specified
|
<R,C> com.d3x.morpheus.frame.DataFrame<R,C> |
read(java.lang.String resource) |
Returns a DataFrame loaded from JSON in the resource specified
|
<R,C> com.d3x.morpheus.frame.DataFrame<R,C> |
read(java.net.URL url) |
Returns a DataFrame loaded from JSON in the resource specified
|
<R,C> com.d3x.morpheus.frame.DataFrame<R,C> |
read(java.util.function.Consumer<JsonSource.Options<R,C>> configurator) |
Returns a DataFrame loaded from JSON as specified by the options
|
private <R,C> void |
readColumns(JsonSource.Options<R,C> options,
int rowCount,
int colCount) |
Reads the column data from JSON and returs a apply of column data by key
|
private <R,C> void |
readRowKeys(JsonSource.Options<R,C> options,
int rowCount) |
Reads row keys from the stream
|
public <R,C> com.d3x.morpheus.frame.DataFrame<R,C> read(java.io.File file)
throws com.d3x.morpheus.frame.DataFrameException
file - the resource to load fromcom.d3x.morpheus.frame.DataFrameException - if frame fails to load from jsonpublic <R,C> com.d3x.morpheus.frame.DataFrame<R,C> read(java.net.URL url)
throws com.d3x.morpheus.frame.DataFrameException
url - the resource to load fromcom.d3x.morpheus.frame.DataFrameException - if frame fails to load from jsonpublic <R,C> com.d3x.morpheus.frame.DataFrame<R,C> read(java.io.InputStream is)
throws com.d3x.morpheus.frame.DataFrameException
is - the resource to load fromcom.d3x.morpheus.frame.DataFrameException - if frame fails to load from jsonpublic <R,C> com.d3x.morpheus.frame.DataFrame<R,C> read(java.lang.String resource)
throws com.d3x.morpheus.frame.DataFrameException
resource - the resource to load fromcom.d3x.morpheus.frame.DataFrameException - if frame fails to load from jsonpublic <R,C> com.d3x.morpheus.frame.DataFrame<R,C> read(java.util.function.Consumer<JsonSource.Options<R,C>> configurator) throws com.d3x.morpheus.frame.DataFrameException
configurator - the options configuratorcom.d3x.morpheus.frame.DataFrameException - if frame fails to load from jsonprivate <R,C> com.d3x.morpheus.frame.DataFrame<R,C> createFrame(JsonSource.Options<R,C> options)
options - the json optionsprivate <R,C> void readRowKeys(JsonSource.Options<R,C> options, int rowCount)
options - the json optionsrowCount - the row count for frameprivate <R,C> void readColumns(JsonSource.Options<R,C> options, int rowCount, int colCount)
rowCount - the row countcolCount - the column countprivate java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap(com.d3x.morpheus.util.text.Formats formats)
formats - the formatsCopyright 2014-2018, D3X Systems