--- /dev/null
+/*\r
+ * This is the MIT license, see also http://www.opensource.org/licenses/mit-license.html\r
+ *\r
+ * Copyright (c) 2001 Brian Pitcher\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a\r
+ * copy of this software and associated documentation files (the "Software"),\r
+ * to deal in the Software without restriction, including without limitation\r
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
+ * and/or sell copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included in\r
+ * all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ */\r
+\r
+// $Header: /project/jiss/smhuang/leap/weblech/src/spider/URLToDownload.java,v 1.1 2010/06/30 15:45:25 smhuang Exp $\r
+\r
+package spider;\r
+\r
+import java.net.URL;\r
+\r
+public class URLToDownload implements java.io.Serializable\r
+{\r
+ private final URL url;\r
+ private final URL referer;\r
+ private final int depth;\r
+\r
+ public URLToDownload(URL url, int depth)\r
+ {\r
+ this(url, null, depth);\r
+ }\r
+\r
+ public URLToDownload(URL url, URL referer, int depth)\r
+ {\r
+ this.url = url;\r
+ this.referer = referer;\r
+ this.depth = depth;\r
+ }\r
+\r
+ public URL getURL()\r
+ {\r
+ return url;\r
+ }\r
+\r
+ public URL getReferer()\r
+ {\r
+ return referer;\r
+ }\r
+\r
+ public int getDepth()\r
+ {\r
+ return depth;\r
+ }\r
+\r
+ public String toString()\r
+ {\r
+ return url + ", referer " + referer + ", depth " + depth;\r
+ }\r
+}\r