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

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.site.classes.SiteData
      extended by edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
          extended by edu.isi.pegasus.planner.catalog.site.classes.ReplicaCatalog
All Implemented Interfaces:
Cloneable

public class ReplicaCatalog
extends AbstractSiteData

This data class describes the Replica Catalog associated with the site.

Version:
$Revision: 2982 $
Author:
Karan Vahi

Field Summary
protected  Set<String> mAliases
          Set of alias names to be used for lookup.
protected  Collection<Connection> mConnectionParams
          Collection of connection parameters to use for connecting to that replica catalog.
protected  String mType
          The type of the replica catalog implementation to use.
protected  String mURL
          The url for the catalog.
 
Constructor Summary
ReplicaCatalog()
          The default constrcutor.
ReplicaCatalog(String url, String type)
          The overloaded constructor.
 
Method Summary
 void addAlias(String name)
          Adds an alias site handle.
 void addConnection(Connection connection)
          Adds a connection parameter
 void clearAliases()
          Clears the aliases associates with the replica catalog.
 Object clone()
          Returns the clone of the object.
 Iterator<String> getAliasIterator()
          Returns an iterator to aliases associated with the site.
 Iterator<Connection> getConnectionIterator()
          Returns an iterator to connection params associated with the replica catalog.
 String getType()
          Returns the type of replica catalog.
 String getURL()
          Returns the url for the replica catalog.
 void initialize(String url, String type)
          Initialize the class.
 void setType(String type)
          Sets the type of replica catalog.
 void setURL(String url)
          Sets the url for the replica catalog.
 void toXML(Writer writer, String indent)
          Writes out the xml description of the object.
protected  void writeAlias(Writer writer, String indent, String value)
          Renders alias as xml
 
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

mURL

protected String mURL
The url for the catalog.


mType

protected String mType
The type of the replica catalog implementation to use.


mConnectionParams

protected Collection<Connection> mConnectionParams
Collection of connection parameters to use for connecting to that replica catalog.


mAliases

protected Set<String> mAliases
Set of alias names to be used for lookup.

Constructor Detail

ReplicaCatalog

public ReplicaCatalog()
The default constrcutor.


ReplicaCatalog

public ReplicaCatalog(String url,
                      String type)
The overloaded constructor.

Parameters:
url - the url for the replica catalog.
type - the type of replica catalog.
Method Detail

initialize

public void initialize(String url,
                       String type)
Initialize the class.

Parameters:
url - the url for the replica catalog.
type - the type of replica catalog.

setURL

public void setURL(String url)
Sets the url for the replica catalog.

Parameters:
url - the url

getURL

public String getURL()
Returns the url for the replica catalog.

Returns:
url

setType

public void setType(String type)
Sets the type of replica catalog.

Parameters:
type - the type of replica catalog.

getType

public String getType()
Returns the type of replica catalog.

Returns:
type.

addAlias

public void addAlias(String name)
Adds an alias site handle.

Parameters:
name - the site handle to alias to.

addConnection

public void addConnection(Connection connection)
Adds a connection parameter

Parameters:
connection - the connection parameter.

clearAliases

public void clearAliases()
Clears the aliases associates with the replica catalog.


getAliasIterator

public Iterator<String> getAliasIterator()
Returns an iterator to aliases associated with the site.

Returns:
Iterator

getConnectionIterator

public Iterator<Connection> getConnectionIterator()
Returns an iterator to connection params associated with the replica catalog.

Returns:
Iterator

toXML

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

clone

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

Overrides:
clone in class AbstractSiteData
Returns:
the clone

writeAlias

protected void writeAlias(Writer writer,
                          String indent,
                          String value)
                   throws IOException
Renders alias as xml

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.
value - the value to use.
Throws:
IOException - if something fishy happens to the stream.


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