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

## Class StorageType

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

All Implemented Interfaces:
  java.lang.Cloneable

Direct Known Subclasses:
  HeadNodeScratch, HeadNodeStorage, WorkerNodeScratch, WorkerNodeStorage

    public class StorageType
    extends AbstractSiteData

An Abstract Data class to describe the filesystem layout on a site, both shared and local on a site/node

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`protected LocalDirectory` `mLocalDirectory` The local directory on the node.
`protected SharedDirectory` `mSharedDirectory` The shared directory on the node.

### Constructor Summary

Constructors
Constructor and Description
`StorageType()` The default constructor
`StorageType(LocalDirectory local, SharedDirectory shared)` The overloaded constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `accept(SiteDataVisitor visitor)` Accept method for the SiteData classes that accepts a visitor
`java.lang.Object` `clone()` Returns the clone of the object.
`private void` `complain(Directory.TYPE type)` Throws a Runtime Exception
`LocalDirectory` `getLocalDirectory()` Returns the local directory.
`SharedDirectory` `getSharedDirectory()` Returns the shared directory.
`void` `setLocalDirectory(Directory local)` Sets the local directory.
`void` `setLocalDirectory(LocalDirectory local)` Sets the local directory.
`void` `setSharedDirectory(Directory shared)` Sets the shared directory.
`void` `setSharedDirectory(SharedDirectory shared)` Sets the shared directory.
`void` `toXML(java.io.Writer writer, java.lang.String indent)` Writes out the xml description of the object.

### Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData

`toString, toXML, writeAttribute`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### mLocalDirectory

    protected LocalDirectory mLocalDirectory

The local directory on the node.

#### mSharedDirectory

    protected SharedDirectory mSharedDirectory

The shared directory on the node.

### Constructor Detail

#### StorageType

    public StorageType()

The default constructor

#### StorageType

    public StorageType(LocalDirectory local,
                       SharedDirectory shared)

The overloaded constructor.

Parameters:
  `local` - the local directory on the node.
  `shared` - the shared directory on the node.

### Method Detail

#### setLocalDirectory

    public void setLocalDirectory(LocalDirectory local)

Sets the local directory.

Parameters:
  `local` - the local directory.

#### setLocalDirectory

    public void setLocalDirectory(Directory local)

Sets the local directory.

Parameters:
  `local` - the local directory.

#### getLocalDirectory

    public LocalDirectory getLocalDirectory()

Returns the local directory.

Returns:
  the local directory.

#### setSharedDirectory

    public void setSharedDirectory(SharedDirectory shared)

Sets the shared directory.

Parameters:
  `shared` - the shared directory.

#### setSharedDirectory

    public void setSharedDirectory(Directory shared)

Sets the shared directory.

Parameters:
  `shared` - the shared directory.

#### getSharedDirectory

    public SharedDirectory getSharedDirectory()

Returns the shared directory.

Returns:
  the shared directory.

#### clone

    public java.lang.Object clone()

Returns the clone of the object.

Overrides:
  `clone` in class `AbstractSiteData`
Returns:
  the clone

#### complain

    private void complain(Directory.TYPE type)

Throws a Runtime Exception

Parameters:
  `Directory.TYPE` - the directory type

#### toXML

    public void toXML(java.io.Writer writer,
                      java.lang.String indent)
               throws java.io.IOException

Description copied from class: `AbstractSiteData`
Writes out the xml description of the object.

Specified by:
  `toXML` in class `AbstractSiteData`
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.

#### accept

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

Description copied from class: `AbstractSiteData`
Accept method for the SiteData classes that accepts a visitor

Specified by:
  `accept` in class `AbstractSiteData`
Parameters:
  `visitor` - the visitor to be used
Throws:
  `java.io.IOException` - if something fishy happens to the stream.