Class RegexLinkExtractorConfig
java.lang.Object
com.norconex.crawler.web.doc.operations.link.impl.RegexLinkExtractorConfig
Configuration for RegexLinkExtractor.
- Since:
- 2.7.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intDefault maximum length a URL can have. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoidClears all restrictions.booleanGets the character set of pages on which link extraction is performed.The matcher of content types to apply link extraction on.Matcher of one or more fields to use as the source of content to extract links from, instead of the document content.intThe maximum supported URL length.Gets all restrictionsinthashCode()setCharset(Charset charset) Gets the character set of pages on which link extraction is performed.setContentTypeMatcher(TextMatcher matcher) The matcher of content types to apply link extraction on.setMaxUrlLength(int maxUrlLength) The maximum supported URL length.toString()
-
Field Details
-
DEFAULT_CONTENT_TYPE_PATTERN
- See Also:
-
DEFAULT_MAX_URL_LENGTH
public static final int DEFAULT_MAX_URL_LENGTHDefault maximum length a URL can have.- See Also:
-
-
Constructor Details
-
RegexLinkExtractorConfig
public RegexLinkExtractorConfig()
-
-
Method Details
-
getPatterns
-
setPatterns
public RegexLinkExtractorConfig setPatterns(List<RegexLinkExtractorConfig.ExtractionPattern> patterns) -
clearPatterns
-
setContentTypeMatcher
The matcher of content types to apply link extraction on. No attempt to extract links from any other content types will be made. Default matches all content types.- Parameters:
matcher- content type matcher- Returns:
- this
-
clearRestrictions
public void clearRestrictions()Clears all restrictions. -
getRestrictions
Gets all restrictions- Returns:
- the restrictions
-
getMaxUrlLength
public int getMaxUrlLength()The maximum supported URL length. Default is 2048. -
getCharset
Gets the character set of pages on which link extraction is performed. Default isnull(charset detection will be attempted). -
getContentTypeMatcher
The matcher of content types to apply link extraction on. No attempt to extract links from any other content types will be made. Default matches all content types -
getFieldMatcher
Matcher of one or more fields to use as the source of content to extract links from, instead of the document content. -
setMaxUrlLength
The maximum supported URL length. Default is 2048.- Returns:
this.
-
setCharset
Gets the character set of pages on which link extraction is performed. Default isnull(charset detection will be attempted).- Returns:
this.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-