public class AsciiHeadersParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AsciiHeadersParser.BundleDescriptor |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_DIMENSION
property for dimension of the data defining rank and qube dims.
|
static java.lang.String |
PROP_ELEMENT_LABELS
Human-readable label for each column of the parameter.
|
static java.lang.String |
PROP_ELEMENT_NAMES
NAME identifier to assign to each column of the parameter.
|
Constructor and Description |
---|
AsciiHeadersParser() |
Modifier and Type | Method and Description |
---|---|
static QDataSet |
getInlineDataSet(QDataSet bds,
java.lang.String name)
allow inline dataset to be retrieved.
|
static java.lang.String[] |
getInlineDataSetNames(QDataSet bds)
return the list of inline dataset names.
|
static AsciiHeadersParser.BundleDescriptor |
parseMetadata(java.lang.String header,
java.lang.String[] columns,
java.lang.String[] columnLabels)
attempt to parse the JSON metadata stored in the header.
|
static AsciiHeadersParser.BundleDescriptor |
parseMetadataHapi(JSONObject doc) |
protected java.lang.String |
prep(java.lang.String s)
Preprocess the string to make more valid JSON.
|
public static final java.lang.String PROP_DIMENSION
public static final java.lang.String PROP_ELEMENT_NAMES
public static final java.lang.String PROP_ELEMENT_LABELS
protected java.lang.String prep(java.lang.String s)
s
- public static AsciiHeadersParser.BundleDescriptor parseMetadataHapi(JSONObject doc) throws JSONException, java.text.ParseException
JSONException
java.text.ParseException
public static AsciiHeadersParser.BundleDescriptor parseMetadata(java.lang.String header, java.lang.String[] columns, java.lang.String[] columnLabels) throws java.text.ParseException
header
- the JSON headercolumns
- identifiers for each columncolumnLabels
- labels for each columnjava.text.ParseException
http://autoplot.org/richAscii
,
https://github.com/hapi-server/data-specification/blob/master/hapi-dev/HAPI-data-access-spec-dev.md#info
public static QDataSet getInlineDataSet(QDataSet bds, java.lang.String name)
bds
- a BundleDescriptor, from BUNDLE_1. This must have been created by this code.name
- the name of the inline datasetjava.lang.IllegalArgumentException
- if the dataset not a BundleDescriptor.public static java.lang.String[] getInlineDataSetNames(QDataSet bds)
bds
- bundle dataset descriptor, though only BundleDescriptor is supported.