ucar.nc2.ncml
Class NcMLWriter
java.lang.Object
ucar.nc2.ncml.NcMLWriter
public class NcMLWriter
- extends Object
Helper class to write NcML.
- Author:
- caron
- See Also:
NetcdfFile
,
http://www.unidata.ucar.edu/software/netcdf/ncml/
Field Summary |
protected static org.jdom.Namespace |
ncNS
|
protected static org.jdom.Namespace |
xsiNS
|
Method Summary |
static void |
main(String[] arg)
|
static org.jdom.Element |
writeAttribute(Attribute att,
String elementName,
org.jdom.Namespace ns)
|
static org.jdom.Element |
writeDimension(Dimension dim,
org.jdom.Namespace ns)
|
static org.jdom.Element |
writeValues(VariableEnhanced v,
org.jdom.Namespace ns,
boolean allowRegular)
|
String |
writeXML(NetcdfFile ncfile)
Write NcML from specified NetcdfFile to a String. |
void |
writeXML(NetcdfFile ncfile,
OutputStream os,
String location)
Write a NetcdfFile as an XML document to the specified stream. |
void |
writeXML(NetcdfFile ncfile,
String filenameOut)
Write a NetcdfFile as an XML document to the specified file. |
String |
writeXML(Variable v)
|
void |
writeXMLexplicit(NetcdfFile ncfile,
OutputStream os,
String location)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ncNS
protected static final org.jdom.Namespace ncNS
xsiNS
protected static final org.jdom.Namespace xsiNS
NcMLWriter
public NcMLWriter()
writeXML
public String writeXML(NetcdfFile ncfile)
throws IOException
- Write NcML from specified NetcdfFile to a String.
- Parameters:
ncfile
- NcML for this NetcdfFile
- Returns:
- the NcML in a String
- Throws:
IOException
- on io error
writeXML
public String writeXML(Variable v)
throws IOException
- Throws:
IOException
writeXML
public void writeXML(NetcdfFile ncfile,
String filenameOut)
throws IOException
- Write a NetcdfFile as an XML document to the specified file.
- Parameters:
ncfile
- NcML for this NetcdfFilefilenameOut
- write NcML to this location
- Throws:
IOException
- on io error
writeXML
public void writeXML(NetcdfFile ncfile,
OutputStream os,
String location)
throws IOException
- Write a NetcdfFile as an XML document to the specified stream.
- Parameters:
ncfile
- NcML for this NetcdfFileos
- write to this OutputStreamlocation
- normally null, meaning use ncd.getLocation(); otherwise put this into the NcML location
- Throws:
IOException
- on io error
writeXMLexplicit
public void writeXMLexplicit(NetcdfFile ncfile,
OutputStream os,
String location)
throws IOException
- Throws:
IOException
writeAttribute
public static org.jdom.Element writeAttribute(Attribute att,
String elementName,
org.jdom.Namespace ns)
writeDimension
public static org.jdom.Element writeDimension(Dimension dim,
org.jdom.Namespace ns)
writeValues
public static org.jdom.Element writeValues(VariableEnhanced v,
org.jdom.Namespace ns,
boolean allowRegular)
main
public static void main(String[] arg)
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.