edu.isi.pegasus.planner.catalog.site.classes
Class AbstractSiteData

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.site.classes.SiteData
      extended by edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Connection, DirectoryType, FileServerType, FileSystemType, GridGateway, HeadNodeFS, ReplicaCatalog, SiteCatalogEntry, SiteStore, StorageType, WorkerNodeFS

public abstract class AbstractSiteData
extends SiteData

The abstract data class for Site classes.

Author:
Karan Vahi

Constructor Summary
AbstractSiteData()
           
 
Method Summary
 Object clone()
          Returns the clone of the object.
 String toString()
          Writes out the object as a string.
 String toXML()
          Returns the xml description of the object.
abstract  void toXML(Writer writer, String indent)
          Writes out the xml description of the object.
 void writeAttribute(Writer writer, String key, String value)
          Writes an attribute to the stream.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSiteData

public AbstractSiteData()
Method Detail

toXML

public String toXML()
             throws IOException
Returns the xml description of the object. This is used for generating the partition graph. That is no longer done.

Returns:
String containing the object in XML.
Throws:
IOException - if something fishy happens to the stream.

toXML

public abstract void toXML(Writer writer,
                           String indent)
                    throws IOException
Writes out the xml description of the object.

Parameters:
writer - is a Writer opened and ready for writing. This can also be a StringWriter for efficient output.
indent - the indent to be used.
Throws:
IOException - if something fishy happens to the stream.

toString

public String toString()
Writes out the object as a string. Internally calls out the toXML method.

Overrides:
toString in class Object
Returns:
string description

writeAttribute

public void writeAttribute(Writer writer,
                           String key,
                           String value)
                    throws IOException
Writes an attribute to the stream. Wraps the value in quotes as required by XML.

Parameters:
writer -
key -
value -
Throws:
IOException - if something fishy happens to the stream.

clone

public Object clone()
             throws CloneNotSupportedException
Returns the clone of the object.

Overrides:
clone in class Object
Returns:
the clone
Throws:
CloneNotSupportedException


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