public class XMLPointWriter extends NavigationPointWriter
XMLPointWriter
class writes navigation point data
to an XML format file. Each navigation point is written as an XML
<point>
element with attributes and subelements
specifying the data.gridCache, reader, variableList
Constructor and Description |
---|
XMLPointWriter(EarthDataReader reader,
java.util.List<java.lang.String> variableList,
java.util.List<NavigationPoint> pointList)
Creates an XML point writer.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
Tests this class.
|
protected void |
writeFooter(java.io.PrintStream stream)
Writes the file footer to the stream.
|
protected void |
writeHeader(java.io.PrintStream stream)
Writes the file header to the stream.
|
protected void |
writePoint(java.io.PrintStream stream,
NavigationPoint point)
Writes a single point to the stream.
|
getNorth, getTestPoints, write
public XMLPointWriter(EarthDataReader reader, java.util.List<java.lang.String> variableList, java.util.List<NavigationPoint> pointList) throws java.io.IOException
reader
- the reader to use for extra data to write with each
point.variableList
- the list of variables from the reader to use
for writing variable data at each point.pointList
- the list of navigation points to write.java.io.IOException
- if an error occurred accessing a data
variable from the list.protected void writeHeader(java.io.PrintStream stream)
NavigationPointWriter
writeHeader
in class NavigationPointWriter
stream
- the print stream to write to.protected void writePoint(java.io.PrintStream stream, NavigationPoint point)
NavigationPointWriter
writePoint
in class NavigationPointWriter
stream
- the print stream to write to.point
- the navigation point to write.protected void writeFooter(java.io.PrintStream stream)
NavigationPointWriter
writeFooter
in class NavigationPointWriter
stream
- the print stream to write to.public static void main(java.lang.String[] argv) throws java.lang.Exception
argv
- the array of command line parameters.java.lang.Exception