Package com.crawljax.core.configuration
Class DefaultCrawlScope
- java.lang.Object
-
- com.crawljax.core.configuration.DefaultCrawlScope
-
- All Implemented Interfaces:
CrawlScope
public class DefaultCrawlScope extends Object implements CrawlScope
ACrawlScopethat allows to crawl only under a given domain.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description DefaultCrawlScope(URI url)Constructs aDefaultCrawlScopewith the given URL.
-
-
-
Field Detail
-
url
private URI url
-
-
Constructor Detail
-
DefaultCrawlScope
public DefaultCrawlScope(URI url)
Constructs aDefaultCrawlScopewith the given URL.- Parameters:
url- the URL with allowed domain, must not benull.
-
-
Method Detail
-
getUrl
public URI getUrl()
Gets the URL used for scope check.- Returns:
- the URL used for scope check.
-
isInScope
public boolean isInScope(String url)
Description copied from interface:CrawlScopeTells whether or not the given URL is in scope.Called during the crawl process, to know if the crawling process should crawl or backtrack.
- Specified by:
isInScopein interfaceCrawlScope- Parameters:
url- the URL to check if it's in scope.- Returns:
trueif the given URL is in scope,falseotherwise.
-
-