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 void
init(URI responseUrl)
Initializes this receiver for a new page.void
link(URI uri)
Handles a link.void
location(URI location)
Handles the location defined by headers.void
metaLocation(URI location)
Handles the location defined by aMETA
element.void
metaRefresh(URI refresh)
Handles the refresh defined by aMETA
element.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 aMETA
element.- Parameters:
location
- the location defined by theMETA
element.
-
metaRefresh
Handles the refresh defined by aMETA
element.- Parameters:
refresh
- the URL defined by theMETA
element.
-
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.
-