public class ParseUtil extends Configured
Parser
s to obtain
Parse
objects.Modifier and Type | Class and Description |
---|---|
static class |
ParseUtil.ChangeFrequency |
Constructor and Description |
---|
ParseUtil(Configuration conf) |
Modifier and Type | Method and Description |
---|---|
Configuration |
getConf() |
Parse |
parse(java.lang.String url,
WebPage page)
|
void |
process(java.lang.String url,
WebPage page)
Parses given web page and stores parsed content within page.
|
void |
processSitemapParse(java.lang.String url,
WebPage page,
Mapper.Context context)
Parses given sitemap page and stores parsed content within page.
|
void |
setConf(Configuration conf) |
boolean |
status(java.lang.String url,
WebPage page) |
public ParseUtil(Configuration conf)
conf
- public Configuration getConf()
getConf
in interface Configurable
getConf
in class Configured
public void setConf(Configuration conf)
setConf
in interface Configurable
setConf
in class Configured
public Parse parse(java.lang.String url, WebPage page) throws ParseException
Parser
s
until a successful parse is performed and a Parse
object is
returned. If the parse is unsuccessful, a message is logged to the
WARNING
level, and an empty parse is returned.ParserNotFound
- If there is no suitable parser found.ParseException
- If there is an error parsing.public boolean status(java.lang.String url, WebPage page)
public void processSitemapParse(java.lang.String url, WebPage page, Mapper.Context context)
public void process(java.lang.String url, WebPage page)
url
- page
- Copyright © 2019 The Apache Software Foundation