public class FeedParser extends java.lang.Object implements Parser
A new RSS/ATOM FeedParser
that rapidly parses all referenced
links and content present in the feed.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHARSET_UTF8 |
static java.lang.String |
TEXT_PLAIN_CONTENT_TYPE |
X_POINT_ID
Constructor and Description |
---|
FeedParser() |
Modifier and Type | Method and Description |
---|---|
Configuration |
getConf() |
ParseResult |
getParse(Content content)
Parses the given feed and extracts out and parsers all linked items within
the feed, using the underlying ROME feed parsing library.
|
static void |
main(java.lang.String[] args)
Runs a command line version of this
Parser . |
void |
setConf(Configuration conf)
Sets the
Configuration object for this Parser . |
public static final java.lang.String CHARSET_UTF8
public static final java.lang.String TEXT_PLAIN_CONTENT_TYPE
public ParseResult getParse(Content content)
public void setConf(Configuration conf)
Configuration
object for this Parser
. This
Parser
expects the following configuration properties to be set:
setConf
in interface Configurable
conf
- The Hadoop Configuration
object to use to configure this
Parser
.public Configuration getConf()
getConf
in interface Configurable
Configuration
object used to configure this
Parser
.public static void main(java.lang.String[] args) throws java.lang.Exception
Parser
.args
- A single argument (expected at arg[0]) representing a path on the
local filesystem that points to a feed file.java.lang.Exception
- If any error occurs.Copyright © 2019 The Apache Software Foundation