-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.lang.ChainedHandler,ai.platon.pulsar.common.lang.PFunction,ai.platon.pulsar.common.lang.PFunction2,ai.platon.pulsar.common.lang.PHandler
public class WebPageHTMLDocumentEventHandler extends AbstractChainedFunction2<WebPage, FeaturedDocument, Any>An event handler that accepts a WebPage and a FeaturedDocument, anything can be returned.
The event handler should work with the passed document, such as extracting fields, persisting extraction results, collecting more links, and so on.
The Web asset might be changed by the handler since WebPage has setters.
If the Web asset is not supposed to be changed, readonly handlers should be used which accept a WebAsset instead of WebPage.
Another possible way to write more robust code is to remove all setters in WebPage, and add a MutableWebPage subclass.
-
-
Constructor Summary
Constructors Constructor Description WebPageHTMLDocumentEventHandler()
-
Method Summary
Modifier and Type Method Description BooleangetIsEmpty()BooleangetIsNotEmpty()BooleangetIsRelevant()StringgetName()IntegergetPriority()IntegergetSize()-
-
Method Detail
-
getIsEmpty
Boolean getIsEmpty()
-
getIsNotEmpty
Boolean getIsNotEmpty()
-
getIsRelevant
Boolean getIsRelevant()
-
getPriority
Integer getPriority()
-
-
-
-