public interface HapiInfo
Modifier and Type | Method and Description |
---|---|
static HapiInfo |
fromCommentedStream(InputStream in,
int[] overread1)
Reads a HapiInfo object from an input stream containing a JSON
object with "#" signs at the start of lines,
as per the HAPI data response when it includes a header.
|
static HapiInfo |
fromJson(org.json.JSONObject json)
Reads HapiInfo from a HAPI Info response JSON object.
|
String |
getCadence()
Returns the approximate cadence of records for this dataset.
|
String |
getFormat()
Returns the data format.
|
HapiVersion |
getHapiVersion()
Returns the HAPI version.
|
String |
getMaxRequestDuration()
Returns the maximum allowed duration for a request.
|
String |
getMetadata(String key)
Returns any other string-typed metadata item provided by the
info object.
|
HapiParam[] |
getParameters()
Returns the parameters (table columns) associated with the dataset.
|
String |
getResourceUrl()
Returns the resource URL with additional information about the dataset.
|
String |
getSampleStartDate()
Returns the sample start date if available.
|
String |
getSampleStopDate()
Returns the sample stop date if available.
|
String |
getStartDate()
Returns the start date for this dataset.
|
String |
getStopDate()
Returns the end date for this dataset.
|
static String |
readCommentedText(InputStream in,
int[] overread1)
Reads all the commented lines at the start of a stream,
storing the first byte of the uncommented part in a supplied buffer.
|
HapiVersion getHapiVersion()
HapiParam[] getParameters()
String getStartDate()
String getStopDate()
String getFormat()
String getResourceUrl()
String getCadence()
String getMaxRequestDuration()
String getSampleStartDate()
String getSampleStopDate()
String getMetadata(String key)
key
- name of entry in Info structure JSON objectstatic HapiInfo fromJson(org.json.JSONObject json)
json
- JSON objectstatic HapiInfo fromCommentedStream(InputStream in, int[] overread1) throws IOException
overread1
buffer
if present. If the end of the file is encounted before any
non-comment content, -1 is written to that buffer.in
- stream containing commented JSONoverread1
- buffer for receiving the first non-comment byte,
may be nullIOException
static String readCommentedText(InputStream in, int[] overread1) throws IOException
This method should be private, but Java 8, unlike Java 9+, does not permit private static methods on interfaces.
in
- stream containing commented JSONoverread1
- buffer for receiving the first non-comment byte,
may be nullIOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.