edu.isi.pegasus.planner.partitioner
Class PDAXWriter

java.lang.Object
  extended by edu.isi.pegasus.planner.partitioner.PDAXWriter

public class PDAXWriter
extends Object

It writes out the partition graph in xml form.

Version:
$Revision: 2576 $
Author:
Karan Vahi

Field Summary
private  String mFileName
          The fully qaulified path to the file being written.
private  LogManager mLogger
          The handle to the logging object.
private  String mName
          The name assigned to the pdax file being written.
private  PrintWriter mWriteHandle
          The write handle to the xml file being written.
static String XML_NAMESPACE
           
static String XML_VERSION
          The version of the associated xml schema, to which the pdax files being written conform to.
 
Constructor Summary
PDAXWriter(String name, String fileName)
          The overloaded constructor.
 
Method Summary
 void close()
          Close the xml file that is written.
 void write(Partition p)
          Writes out a partition to the associate XML stream.
 void write(String st)
          Writes out to the file.
 void writeHeader()
          Writes out the opening element of the xml document.
 void writeln(String st)
          Writes out to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_VERSION

public static final String XML_VERSION
The version of the associated xml schema, to which the pdax files being written conform to.

See Also:
Constant Field Values

XML_NAMESPACE

public static final String XML_NAMESPACE
See Also:
Constant Field Values

mWriteHandle

private PrintWriter mWriteHandle
The write handle to the xml file being written.


mLogger

private LogManager mLogger
The handle to the logging object.


mName

private String mName
The name assigned to the pdax file being written.


mFileName

private String mFileName
The fully qaulified path to the file being written.

Constructor Detail

PDAXWriter

public PDAXWriter(String name,
                  String fileName)
The overloaded constructor.

Parameters:
name - the name that is assigned to the pdax.
fileName - the path to the xml file that has to be written.
Method Detail

writeHeader

public void writeHeader()
Writes out the opening element of the xml document.


write

public void write(Partition p)
           throws IOException
Writes out a partition to the associate XML stream.

Parameters:
p - the partition to be written to the stream.
Throws:
IOException - if something fishy happens to the stream.

write

public void write(String st)
Writes out to the file.

Parameters:
st - String

writeln

public void writeln(String st)
Writes out to the file.

Parameters:
st - String

close

public void close()
Close the xml file that is written.



Copyright © 2011 The University of Southern California. All Rights Reserved.