public ParseUtil(org.apache.hadoop.conf.Configuration conf)
conf - public ParseResult parse(Content content) throws ParseException
Parsers
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.content - The content to try and parse.Parse> pairs.ParseException - If no suitable parser is found to perform the parse.public ParseResult parseByExtensionId(String extId, Content content) throws ParseException
Content object using the Parser specified
by the parameter extId, i.e., the Parser's extension ID.
If a suitable Parser is not found, then a WARNING
level message is logged, and a ParseException is thrown. If the parse is
uncessful for any other reason, then a WARNING level
message is logged, and a ParseStatus.getEmptyParse() is
returned.extId - The extension implementation ID of the Parser to use
to parse the specified content.content - The content to parse.Parse> pairs if the parse is successful, otherwise,
a single <key, ParseStatus.getEmptyParse()> pair.ParseException - If there is no suitable Parser found
to perform the parse.Copyright © 2014 The Apache Software Foundation