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

## Class AbstractSiteData

- java.lang.Object
- - edu.isi.pegasus.planner.catalog.site.classes.SiteData
  - - edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData

All Implemented Interfaces:
  java.lang.Cloneable

Direct Known Subclasses:
  Connection, DirectoryLayout, FileServerType, FileSystemType, GridGateway, HeadNodeFS, ReplicaCatalog, SiteCatalogEntry, SiteCatalogEntry3, SiteStore, StorageType, WorkerNodeFS

    public abstract class AbstractSiteData
    extends SiteData

The abstract data class for Site classes.

Author:
  Karan Vahi

### Constructor Summary

Constructors
Constructor and Description
`AbstractSiteData()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract void` `accept(SiteDataVisitor visitor)` Accept method for the SiteData classes that accepts a visitor
`java.lang.Object` `clone()` Returns the clone of the object.
`java.lang.String` `toString()` Writes out the object as a string.
`java.lang.String` `toXML()` Returns the xml description of the object.
`abstract void` `toXML(java.io.Writer writer, java.lang.String indent)` Writes out the xml description of the object.
`void` `writeAttribute(java.io.Writer writer, java.lang.String key, java.lang.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

#### accept

    public abstract void accept(SiteDataVisitor visitor)
                         throws java.io.IOException

Accept method for the SiteData classes that accepts a visitor

Parameters:
  `visitor` - the visitor to be used
Throws:
  `java.io.IOException` - if something fishy happens to the stream.

#### toXML

    public java.lang.String toXML()
                           throws java.io.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:
  `java.io.IOException` - if something fishy happens to the stream.

#### toXML

    public abstract void toXML(java.io.Writer writer,
                               java.lang.String indent)
                        throws java.io.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:
  `java.io.IOException` - if something fishy happens to the stream.

#### toString

    public java.lang.String toString()

Writes out the object as a string. Internally calls out the toXML method.

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  string description

#### writeAttribute

    public void writeAttribute(java.io.Writer writer,
                               java.lang.String key,
                               java.lang.String value)
                        throws java.io.IOException

Writes an attribute to the stream. Wraps the value in quotes as required by XML.

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

#### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

Returns the clone of the object.

Overrides:
  `clone` in class `java.lang.Object`
Returns:
  the clone
Throws:
  `java.lang.CloneNotSupportedException`