com.fatwire.crawler.url
Class ResourceURL

java.lang.Object
  extended by com.fatwire.crawler.url.ResourceURL

public final class ResourceURL
extends java.lang.Object

This class represents a resource URL which is extracted from a WebResource downloaded as part of the crawl session.

See Also:
Serialized Form

Constructor Summary
ResourceURL(java.net.URI uri, int depth)
          Constructor to create a ResourceURL object.
 
Method Summary
 int getDepth()
          The method is used to return the depth of the ResourceURL.
 int getTries()
          Return the number of tries made to reach this ResourceURL.
 java.net.URI getURI()
          Method is used to return the URI for the ResourceURL.
 int incrementTries()
          Increment and return the number of retries made to reach this ResourceURL.
 

Constructor Detail

ResourceURL

public ResourceURL(java.net.URI uri,
                   int depth)
Constructor to create a ResourceURL object.

Parameters:
uri - URI representing the Resource
depth - number of links away from a start URI. This must be a positive integer and is zero for a starting URI.
Method Detail

getDepth

public int getDepth()
The method is used to return the depth of the ResourceURL.

Returns:
depth of the URL.

getURI

public java.net.URI getURI()
Method is used to return the URI for the ResourceURL.

Returns:
URI URI for this ResourceURL.

incrementTries

public int incrementTries()
Increment and return the number of retries made to reach this ResourceURL.

Returns:
number of tries plus one.

getTries

public int getTries()
Return the number of tries made to reach this ResourceURL.

Returns:
number of times this resource is retried.


Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved