|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.nc2.ncml.NcMLReader
public class NcMLReader
Read NcML and create NetcdfDataset.
| Field Summary | |
|---|---|
static org.jdom.Namespace |
ncNS
|
| Constructor Summary | |
|---|---|
NcMLReader()
|
|
| Method Summary | |
|---|---|
static void |
main(String[] arg)
|
static NetcdfDataset |
mergeNcML(NetcdfFile ref,
org.jdom.Element parentElem)
Use NCML to modify the referenced dataset, create a new dataset with the merged info Used to wrap each dataset of an aggregation before its aggregated |
static NetcdfDataset |
mergeNcMLdirect(NetcdfDataset targetDS,
org.jdom.Element parentElem)
Use NCML to directly modify the dataset |
static Array |
readAttributeValues(org.jdom.Element s)
Parse the values element |
static NetcdfDataset |
readNcML(InputStream ins,
CancelTask cancelTask)
Read NcML doc from an InputStream, and construct a NetcdfDataset. |
static NetcdfDataset |
readNcML(Reader r,
CancelTask cancelTask)
Read NcML doc from a Reader, and construct a NetcdfDataset. |
static NetcdfDataset |
readNcML(Reader r,
String ncmlLocation,
CancelTask cancelTask)
Read NcML doc from a Reader, and construct a NetcdfDataset. |
static NetcdfDataset |
readNcML(String ncmlLocation,
CancelTask cancelTask)
Read an NcML file from a URL location, and construct a NetcdfDataset. |
static NetcdfDataset |
readNcML(String ncmlLocation,
org.jdom.Element netcdfElem,
CancelTask cancelTask)
Read NcML from a JDOM Document, and construct a NetcdfDataset. |
static NetcdfDataset |
readNcML(String ncmlLocation,
String referencedDatasetUri,
CancelTask cancelTask)
Read an NcML file from a URL location, and construct a NetcdfDataset. |
void |
readNetcdf(String ncmlLocation,
NetcdfDataset targetDS,
NetcdfFile refds,
org.jdom.Element netcdfElem,
CancelTask cancelTask)
parse a netcdf JDOM Element, and add contents to the targetDS NetcdfDataset. |
static void |
setDebugFlags(DebugFlags debugFlag)
|
static void |
wrapNcML(NetcdfDataset ncDataset,
String ncmlLocation,
CancelTask cancelTask)
Use NCML to modify the dataset, getting NcML from a URL |
static void |
wrapNcMLresource(NetcdfDataset ncDataset,
String ncmlResourceLocation,
CancelTask cancelTask)
Use NCML to modify a dataset, getting the NcML document as a resource stream. |
static void |
writeNcMLToFile(InputStream ncml,
String fileOutName)
Read an NcML and write an equivilent NetcdfFile to a physical file, using Netcdf-3 file format. |
static void |
writeNcMLToFile(String ncmlLocation,
String fileOutName)
Read an NcML file and write an equivilent NetcdfFile to a physical file, using Netcdf-3 file format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.jdom.Namespace ncNS
| Constructor Detail |
|---|
public NcMLReader()
| Method Detail |
|---|
public static void setDebugFlags(DebugFlags debugFlag)
public static void wrapNcMLresource(NetcdfDataset ncDataset,
String ncmlResourceLocation,
CancelTask cancelTask)
throws IOException
ncDataset - modify this datasetncmlResourceLocation - resource location of NcMLcancelTask - allow user to cancel task; may be null
IOException - on read error
public static void wrapNcML(NetcdfDataset ncDataset,
String ncmlLocation,
CancelTask cancelTask)
throws IOException
ncDataset - modify this datasetncmlLocation - URL location of NcMLcancelTask - allow user to cancel task; may be null
IOException - on read error
public static NetcdfDataset mergeNcML(NetcdfFile ref,
org.jdom.Element parentElem)
throws IOException
ref - referenced datasetparentElem - parent element - usually the aggregation element of the ncml
IOException - on read error
public static NetcdfDataset mergeNcMLdirect(NetcdfDataset targetDS,
org.jdom.Element parentElem)
throws IOException
targetDS - referenced datasetparentElem - parent element - usually the aggregation element of the ncml
IOException - on read error
public static NetcdfDataset readNcML(String ncmlLocation,
CancelTask cancelTask)
throws IOException
ncmlLocation - the URL location string of the NcML documentcancelTask - allow user to cancel the task; may be null
IOException - on read error, or bad referencedDatasetUri URI
public static NetcdfDataset 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 null
IOException - on read error, or bad referencedDatasetUri URI
public static NetcdfDataset readNcML(InputStream ins,
CancelTask cancelTask)
throws IOException
ins - the InputStream containing the NcML documentcancelTask - allow user to cancel the task; may be null
IOException - on read error, or bad referencedDatasetUri URI
public static NetcdfDataset readNcML(Reader r,
CancelTask cancelTask)
throws IOException
r - the Reader containing the NcML documentcancelTask - allow user to cancel the task; may be null
IOException - on read error, or bad referencedDatasetUri URI
public static NetcdfDataset readNcML(Reader r,
String ncmlLocation,
CancelTask cancelTask)
throws IOException
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 null
IOException - on read error, or bad referencedDatasetUri URI
public static NetcdfDataset readNcML(String ncmlLocation,
org.jdom.Element netcdfElem,
CancelTask cancelTask)
throws IOException
ncmlLocation - 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.netcdfElem - the JDOM Document's root (netcdf) elementcancelTask - allow user to cancel the task; may be null
IOException - on read error, or bad referencedDatasetUri URI
public void readNetcdf(String ncmlLocation,
NetcdfDataset targetDS,
NetcdfFile refds,
org.jdom.Element netcdfElem,
CancelTask cancelTask)
throws IOException
ncmlLocation - NcML URL location, or may be just a unique name for caching purposes.targetDS - add the info to this one, never nullrefds - the referenced dataset; may equal newds, never nullnetcdfElem - JDOM netcdf elementcancelTask - allow user to cancel the task; may be null
IOException - on read error
public static Array readAttributeValues(org.jdom.Element s)
throws IllegalArgumentException
s - JDOM element to parse
IllegalArgumentException - if string values not parsable to specified data type
public static void writeNcMLToFile(String ncmlLocation,
String fileOutName)
throws IOException
ncmlLocation - read this NcML filefileOutName - write to this local file
IOException - on write errorFileWriter.writeToFile(ucar.nc2.NetcdfFile, java.lang.String)
public static void writeNcMLToFile(InputStream ncml,
String fileOutName)
throws IOException
ncml - read NcML from this input streamfileOutName - write to this local file
IOException - on errorFileWriter.writeToFile(ucar.nc2.NetcdfFile, java.lang.String)public static void main(String[] arg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||