Package com.norconex.crawler.web.ledger
Class WebCrawlerEntry
java.lang.Object
com.norconex.crawler.core.ledger.CrawlerEntry
com.norconex.crawler.web.ledger.WebCrawlerEntry
- All Implemented Interfaces:
Serializable
A URL being crawled holding relevant crawl information.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.norconex.crawler.core.ledger.CrawlerEntry
CrawlerEntry.Fields -
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.WebCrawlerEntry(String reference) WebCrawlerEntry(String url, int depth) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRedirectURL(String url) Adds a redirect URL to the trail of URLs that were redirected so far.protected booleanbooleangetEtag()The HTTP ETag.HTTP reason phrase from the last fetch response.intHTTP status code from the last fetch response.Gets the trail of URLs that were redirected up to this one.Gets URLs referenced by this one.The document change frequency according to sitemap.The document last modified date according to sitemap.The document priority according to sitemap.Gets the URL root (protocol + domain, e.g. http://www.host.com).inthashCode()booleanWhether this record was obtained from parsing a sitemap.voidThe HTTP ETag.voidsetFromSitemap(boolean fromSitemap) Whether this record was obtained from parsing a sitemap.voidsetHttpReasonPhrase(String httpReasonPhrase) HTTP reason phrase from the last fetch response.voidsetHttpStatusCode(int httpStatusCode) HTTP status code from the last fetch response.voidsetRedirectTarget(String redirectTarget) voidsetRedirectTrail(List<String> redirectTrail) Sets the trail of URLs that were redirected up to this one.final voidsetReference(String url) voidsetReferencedUrls(List<String> referencedUrls) Sets URLs referenced by this one.voidsetReferrerLinkMetadata(String referrerLinkMetadata) voidsetReferrerReference(String referrerReference) voidsetSitemapChangeFreq(String sitemapChangeFreq) The document change frequency according to sitemap.voidsetSitemapLastMod(ZonedDateTime sitemapLastMod) The document last modified date according to sitemap.voidsetSitemapPriority(Float sitemapPriority) The document priority according to sitemap.voidsetUrlRoot(String urlRoot) toString()Methods inherited from class com.norconex.crawler.core.ledger.CrawlerEntry
addToReferenceTrail, getCharset, getContentChecksum, getContentType, getDepth, getLastModified, getMetaChecksum, getProcessedAt, getProcessingAt, getProcessingOutcome, getProcessingStatus, getQueuedAt, getReference, getReferenceTrail, isDeleted, isOrphan, setCharset, setContentChecksum, setContentType, setDeleted, setDepth, setLastModified, setMetaChecksum, setOrphan, setProcessedAt, setProcessingAt, setProcessingOutcome, setProcessingStatus, setQueuedAt, setReferenceTrail, withReference
-
Constructor Details
-
WebCrawlerEntry
public WebCrawlerEntry() -
WebCrawlerEntry
Copy constructor.- Parameters:
src- the source to copy from
-
WebCrawlerEntry
-
WebCrawlerEntry
Constructor.- Parameters:
url- URL being crawleddepth- URL depth
-
-
Method Details
-
setReference
- Overrides:
setReferencein classCrawlerEntry
-
getUrlRoot
Gets the URL root (protocol + domain, e.g. http://www.host.com).- Returns:
- URL root
-
getReferencedUrls
Gets URLs referenced by this one.- Returns:
- URLs referenced by this one (never
null). - Since:
- 2.6.0
-
setReferencedUrls
Sets URLs referenced by this one.- Parameters:
referencedUrls- referenced URLs- Since:
- 3.0.0
-
getRedirectTrail
Gets the trail of URLs that were redirected up to this one.- Returns:
- URL redirection trail to this one (never
null). - Since:
- 2.8.0
-
setRedirectTrail
Sets the trail of URLs that were redirected up to this one.- Parameters:
redirectTrail- URL redirection trail to this one- Since:
- 3.0.0
-
addRedirectURL
Adds a redirect URL to the trail of URLs that were redirected so far.- Parameters:
url- URL to add- Since:
- 3.0.0
-
isFromSitemap
public boolean isFromSitemap()Whether this record was obtained from parsing a sitemap. Set by the queue pipeline so implementors should not have to set it themselves. -
getSitemapLastMod
The document last modified date according to sitemap. -
getSitemapChangeFreq
The document change frequency according to sitemap. -
getSitemapPriority
The document priority according to sitemap. -
getReferrerReference
-
getReferrerLinkMetadata
-
getEtag
The HTTP ETag.- Since:
- 3.0.0
-
getRedirectTarget
-
getHttpStatusCode
public int getHttpStatusCode()HTTP status code from the last fetch response. -
getHttpReasonPhrase
HTTP reason phrase from the last fetch response. -
setUrlRoot
-
setFromSitemap
public void setFromSitemap(boolean fromSitemap) Whether this record was obtained from parsing a sitemap. Set by the queue pipeline so implementors should not have to set it themselves. -
setSitemapLastMod
The document last modified date according to sitemap. -
setSitemapChangeFreq
The document change frequency according to sitemap. -
setSitemapPriority
The document priority according to sitemap. -
setReferrerReference
-
setReferrerLinkMetadata
-
setEtag
The HTTP ETag.- Since:
- 3.0.0
-
setRedirectTarget
-
setHttpStatusCode
public void setHttpStatusCode(int httpStatusCode) HTTP status code from the last fetch response. -
setHttpReasonPhrase
HTTP reason phrase from the last fetch response. -
equals
- Overrides:
equalsin classCrawlerEntry
-
canEqual
- Overrides:
canEqualin classCrawlerEntry
-
hashCode
public int hashCode()- Overrides:
hashCodein classCrawlerEntry
-
toString
- Overrides:
toStringin classCrawlerEntry
-