public class NcmlReader extends Object
This is an internal class, users should usually call NetcdfDatasets.openDataset(String)
| Constructor and Description |
|---|
NcmlReader() |
| Modifier and Type | Method and Description |
|---|---|
static Array<?> |
readAttributeValues(org.jdom2.Element s)
Parse the values element
|
static NetcdfDataset.Builder<?> |
readNcml(Reader r,
String ncmlLocation,
CancelTask cancelTask)
Read NcML doc from a Reader, and construct a NetcdfDataset.Builder.
|
static NetcdfDataset.Builder<?> |
readNcml(String ncmlLocation,
String referencedDatasetUri,
CancelTask cancelTask)
Read an NcML file from a URL location, and construct a NetcdfDataset.
|
static void |
setDebugFlags(DebugFlags debugFlag) |
static void |
wrapNcml(NetcdfDataset.Builder<?> ncDataset,
String ncmlLocation,
CancelTask cancelTask)
Use NCML to modify the dataset, getting NcML from a URL.
|
static void |
wrapNcmlResource(NetcdfDataset.Builder<?> ncDataset,
String ncmlResourceLocation,
CancelTask cancelTask)
Use NCML to modify a dataset, getting the NcML document as a resource stream.
|
public static void setDebugFlags(DebugFlags debugFlag)
public static void wrapNcml(NetcdfDataset.Builder<?> ncDataset, String ncmlLocation, CancelTask cancelTask) throws IOException
ncDataset - modify this datasetncmlLocation - URL location of NcMLcancelTask - allow user to cancel task; may be nullIOException - on read errorpublic static void wrapNcmlResource(NetcdfDataset.Builder<?> ncDataset, String ncmlResourceLocation, CancelTask cancelTask) throws IOException
ncDataset - modify this datasetncmlResourceLocation - resource location of NcMLcancelTask - allow user to cancel task; may be nullIOException - on read errorpublic static NetcdfDataset.Builder<?> readNcml(Reader r, String ncmlLocation, CancelTask cancelTask) throws IOException
NetcdfDatasets.openNcmlDataset(Reader, String, CancelTask)r - the Reader containing the NcML documentncmlLocation - the URL location string of the NcML document, used to resolve reletive path of the referenced
dataset,
or may be just a unique name for caching purposes.cancelTask - allow user to cancel the task; may be nullIOException - on read error, or bad referencedDatasetUri URIpublic static NetcdfDataset.Builder<?> readNcml(String ncmlLocation, String referencedDatasetUri, CancelTask cancelTask) throws IOException
ncmlLocation - the URL location string of the NcML documentreferencedDatasetUri - if null (usual case) get this from NcML, otherwise use URI as the location of the
referenced dataset.cancelTask - allow user to cancel the task; may be nullIOException - on read error, or bad referencedDatasetUri URIpublic static Array<?> readAttributeValues(org.jdom2.Element s) throws IllegalArgumentException
s - JDOM element to parseIllegalArgumentException - if string values not parsable to specified data type