public class CrawleableUriFactoryImpl extends Object implements CrawleableUriFactory
CrawleableUriFactory that is expandable
by UriFilter instances.| Modifier and Type | Field and Description |
|---|---|
protected UriFilter[] |
filters
URI filters applied to the URIs during the generation.
|
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
CrawleableUriFactoryImpl()
The default constructor that imposes no additional requirements.
|
CrawleableUriFactoryImpl(UriFilter... filters)
Constructor taking additional filters that are used to check URIs during
the creation.
|
| Modifier and Type | Method and Description |
|---|---|
CrawleableUri |
create(String uri)
Creates a
CrawleableUri from the given URI String. |
CrawleableUri |
create(URI uri)
Creates a
CrawleableUri from the given URI instance. |
CrawleableUri |
create(URI uri,
UriType type)
|
protected CrawleableUri |
filter(CrawleableUri createdUri)
Returns the given
CrawleableUri instance if all local
filters marked it as a good URI. |
private static final org.slf4j.Logger LOGGER
protected UriFilter[] filters
public CrawleableUriFactoryImpl()
public CrawleableUriFactoryImpl(UriFilter... filters)
filters - public CrawleableUri create(String uri)
CrawleableUriFactoryCrawleableUri from the given URI String.create in interface CrawleableUriFactoryuri - the URI that should be crawleable.CrawleableUri instance based on the given URI string or
null, if the given URI did not fulfill the requirements of a
crawleable URI.public CrawleableUri create(URI uri)
CrawleableUriFactoryCrawleableUri from the given URI instance.create in interface CrawleableUriFactoryuri - the URI that should be crawleable.CrawleableUri instance based on the given URI
instance or null, if the given URI did not fulfill the
requirements of a crawleable URI.public CrawleableUri create(URI uri, UriType type)
CrawleableUriFactorycreate in interface CrawleableUriFactoryuri - the URI that should be crawleable.CrawleableUri instance based on the given URI
instance and the given UriType or null, if the given
URI did not fulfill the requirements of a crawleable URI.protected CrawleableUri filter(CrawleableUri createdUri)
CrawleableUri instance if all local
filters marked it as a good URI. Otherwise null is returned.createdUri - the URI that should be checked using the local filters.CrawleableUri instance if it is a good URI.
Otherwise null is returned.Copyright © 2017–2019. All rights reserved.