Package it.unimi.dsi.law.warc.parser
Interface Parser.LinkReceiver
- All Known Implementing Classes:
HTMLParser.SetLinkReceiver
- Enclosing interface:
- Parser
public static interface Parser.LinkReceiver extends Iterable<URI>
A class that can receive URLs discovered during parsing. It may be used to
iterate over the URLs found in the current page, but what will be actually
returned by the iterator is implementation-dependent.
-
Method Summary
Modifier and Type Method Description voidinit(URI responseUrl)Initializes this receiver for a new page.voidlink(URI uri)Handles a link.voidlocation(URI location)Handles the location defined by headers.voidmetaLocation(URI location)Handles the location defined by aMETAelement.voidmetaRefresh(URI refresh)Handles the refresh defined by aMETAelement.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
location
Handles the location defined by headers.- Parameters:
location- the location defined by headers.
-
metaLocation
Handles the location defined by aMETAelement.- Parameters:
location- the location defined by theMETAelement.
-
metaRefresh
Handles the refresh defined by aMETAelement.- Parameters:
refresh- the URL defined by theMETAelement.
-
link
Handles a link.- Parameters:
uri- a link discovered during the parsing phase.
-
init
Initializes this receiver for a new page.- Parameters:
responseUrl- the URL of the page to be parsed.
-