ucar.nc2.ncml
Class NcMLWriter

java.lang.Object
  extended by ucar.nc2.ncml.NcMLWriter

public class NcMLWriter
extends java.lang.Object

Helper class to write NcML.

Version:
$Revision:63 $ $Date:2006-07-12 21:50:51Z $
Author:
caron
See Also:
NetcdfFile

Field Summary
protected static org.jdom.Namespace ncNS
           
protected static org.jdom.Namespace xsiNS
           
 
Constructor Summary
NcMLWriter()
           
 
Method Summary
static void main(java.lang.String[] arg)
           
static org.jdom.Element writeAttribute(Attribute att, java.lang.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)
           
 void writeXML(NetcdfFile ncfile, java.io.OutputStream os, java.lang.String location)
          Write a NetcdfFile as an XML document to the specified stream.
 void writeXML(NetcdfFile ncfile, java.lang.String filenameOut)
          Write a NetcdfFile as an XML document to the specified file.
 void writeXMLAgg(NetcdfDataset ncd, java.io.OutputStream os, java.lang.String location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ncNS

protected static final org.jdom.Namespace ncNS

xsiNS

protected static final org.jdom.Namespace xsiNS
Constructor Detail

NcMLWriter

public NcMLWriter()
Method Detail

writeXML

public void writeXML(NetcdfFile ncfile,
                     java.lang.String filenameOut)
              throws java.io.IOException
Write a NetcdfFile as an XML document to the specified file.

Parameters:
ncfile - NcML for this NetcdfFile
filenameOut - write NcML to this location
Throws:
java.io.IOException

writeXML

public void writeXML(NetcdfFile ncfile,
                     java.io.OutputStream os,
                     java.lang.String location)
              throws java.io.IOException
Write a NetcdfFile as an XML document to the specified stream.

Parameters:
ncfile - NcML for this NetcdfFile
os - write to this OutputStream
location - normally null, meaning use ncd.getLocation(); otherwise put this into the NcML location
Throws:
java.io.IOException

writeXMLAgg

public void writeXMLAgg(NetcdfDataset ncd,
                        java.io.OutputStream os,
                        java.lang.String location)
                 throws java.io.IOException
Throws:
java.io.IOException

writeAttribute

public static org.jdom.Element writeAttribute(Attribute att,
                                              java.lang.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)

main

public static void main(java.lang.String[] arg)