001: /**
002: * This file or a portion of this file is licensed under the terms of
003: * the Globus Toolkit Public License, found at $PEGASUS_HOME/GTPL or
004: * http://www.globus.org/toolkit/download/license.html.
005: * This notice must appear in redistributions of this file
006: * with or without modification.
007: *
008: * Redistributions of this Software, with or without modification, must reproduce
009: * the GTPL in:
010: * (1) the Software, or
011: * (2) the Documentation or
012: * some other similar material which is provided with the Software (if any).
013: *
014: * Copyright 1999-2004
015: * University of Chicago and The University of Southern California.
016: * All rights reserved.
017: */package org.griphyn.cPlanner.classes;
018:
019: /**
020: * This is a data class that is used to store information about a
021: * local replica catalog, that is associated with a site in the pool configuration
022: * catalog.
023: * <p>
024: * The various attributes that can be associated with the the server are
025: * displayed in the following table.
026: *
027: * <p>
028: * <table border="1">
029: * <tr align="left"><th>Attribute Name</th><th>Attribute Description</th></tr>
030: * <tr align="left"><th>url</th>
031: * <td>the url string pointing to local replica catalog.</td>
032: * </tr>
033: * </table>
034: *
035: * @author Gaurang Mehta gmehta@isi.edu
036: * @author Karan Vahi vahi@isi.edu
037: *
038: * @version $Revision: 50 $
039: */
040: public class LRC {
041:
042: /**
043: * The contact string to the lrc e.g rls://sukhna.isi.edu .
044: */
045: private String mLRCURL;
046:
047: /**
048: * Constructor for the class.
049: *
050: * @param url the url for the local replica catalog.
051: */
052: public LRC(String url) {
053: mLRCURL = url == null ? null : new String(url);
054: }
055:
056: /**
057: * Returns the LRC url associated with a pool.
058: *
059: * @return the lrc url.
060: */
061: public String getURL() {
062: return mLRCURL;
063: }
064:
065: /**
066: * Sets the url of the LRC associated with the object.
067: *
068: * @param url the url string.
069: */
070: public void setURL(String url) {
071: mLRCURL = url;
072: }
073:
074: /**
075: * Returns the textual description of the contents of <code>LRC</code>
076: * object in the multiline format.
077: *
078: * @return the textual description in multiline format.
079: */
080: public String toMultiLine() {
081: return this .toString();
082: }
083:
084: /**
085: * Returns the textual description of the contents of <code>LRC</code> object.
086: *
087: * @return the textual description.
088: */
089: public String toString() {
090: String output = "lrc \"" + mLRCURL + "\"";
091: return output;
092: }
093:
094: /**
095: * Returns the XML description of the contents of <code>LRC</code>
096: * object.
097: *
098: * @return the xml description.
099: */
100: public String toXML() {
101: String output = "<lrc url=\"" + mLRCURL + "\" />";
102: return output;
103: }
104:
105: }
|