Class ReplicaCatalog
- 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.ReplicaCatalog
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ReplicaCatalog extends AbstractSiteData
This data class describes the Replica Catalog associated with the site.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>mAliasesSet of alias names to be used for lookup.protected java.util.Collection<Connection>mConnectionParamsCollection of connection parameters to use for connecting to that replica catalog.protected java.lang.StringmTypeThe type of the replica catalog implementation to use.protected java.lang.StringmURLThe url for the catalog.
-
Constructor Summary
Constructors Constructor Description ReplicaCatalog()The default constrcutor.ReplicaCatalog(java.lang.String url, java.lang.String type)The overloaded constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(SiteDataVisitor visitor)Accept the visitorvoidaddAlias(java.lang.String name)Adds an alias site handle.voidaddConnection(Connection connection)Adds a connection parametervoidclearAliases()Clears the aliases associates with the replica catalog.java.lang.Objectclone()Returns the clone of the object.java.util.Iterator<java.lang.String>getAliasIterator()Returns an iterator to aliases associated with the site.java.util.Iterator<Connection>getConnectionIterator()Returns an iterator to connection params associated with the replica catalog.java.lang.StringgetType()Returns the type of replica catalog.java.lang.StringgetURL()Returns the url for the replica catalog.voidinitialize(java.lang.String url, java.lang.String type)Initialize the class.voidsetType(java.lang.String type)Sets the type of replica catalog.voidsetURL(java.lang.String url)Sets the url for the replica catalog.voidtoXML(java.io.Writer writer, java.lang.String indent)Writes out the xml description of the object.protected voidwriteAlias(java.io.Writer writer, java.lang.String indent, java.lang.String value)Renders alias as xml-
Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
toString, toXML, writeAttribute
-
-
-
-
Field Detail
-
mURL
protected java.lang.String mURL
The url for the catalog.
-
mType
protected java.lang.String mType
The type of the replica catalog implementation to use.
-
mConnectionParams
protected java.util.Collection<Connection> mConnectionParams
Collection of connection parameters to use for connecting to that replica catalog.
-
mAliases
protected java.util.Set<java.lang.String> mAliases
Set of alias names to be used for lookup.
-
-
Method Detail
-
initialize
public void initialize(java.lang.String url, java.lang.String type)Initialize the class.- Parameters:
url- the url for the replica catalog.type- the type of replica catalog.
-
setURL
public void setURL(java.lang.String url)
Sets the url for the replica catalog.- Parameters:
url- the url
-
getURL
public java.lang.String getURL()
Returns the url for the replica catalog.- Returns:
- url
-
setType
public void setType(java.lang.String type)
Sets the type of replica catalog.- Parameters:
type- the type of replica catalog.
-
getType
public java.lang.String getType()
Returns the type of replica catalog.- Returns:
- type.
-
addAlias
public void addAlias(java.lang.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 java.util.Iterator<java.lang.String> getAliasIterator()
Returns an iterator to aliases associated with the site.- Returns:
- Iterator
-
getConnectionIterator
public java.util.Iterator<Connection> getConnectionIterator()
Returns an iterator to connection params associated with the replica catalog.- Returns:
- Iterator
-
toXML
public void toXML(java.io.Writer writer, java.lang.String indent) throws java.io.IOExceptionWrites out the xml description of the object.- Specified by:
toXMLin classAbstractSiteData- 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.
-
clone
public java.lang.Object clone()
Returns the clone of the object.- Overrides:
clonein classAbstractSiteData- Returns:
- the clone
-
writeAlias
protected void writeAlias(java.io.Writer writer, java.lang.String indent, java.lang.String value) throws java.io.IOExceptionRenders 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:
java.io.IOException- if something fishy happens to the stream.
-
accept
public void accept(SiteDataVisitor visitor) throws java.io.IOException
Accept the visitor- Specified by:
acceptin classAbstractSiteData- Parameters:
visitor-- Throws:
java.io.IOException- if something fishy happens to the stream.
-
-