org.apache.abdera.parser
Interface NamedParser
- All Superinterfaces:
- org.apache.abdera.util.NamedItem, Parser
public interface NamedParser
- extends Parser, org.apache.abdera.util.NamedItem
Abdera's abstract parsing model allows developers to implement parsers capable of translating non-Atom formats into
Abdera objects. For instance, a developer could create an RDF, RSS, JSON or hAtom microformat parser that
automatically converted to Atom. Alternative parsers are made available via the ParserFactory interface.
Parser parser = abdera.getParserFactory().getParser("json");
Document<Feed> doc = parser.parse(...);
Parser parser = abdera.getParserFactory().getParser("hatom");
Document<Feed> doc = parser.parse(...);
Method Summary |
String[] |
getInputFormats()
Returns a listing of media type of the format consumed by this parser |
boolean |
parsesFormat(String mediatype)
Returns true if this parser is capable of consuming the specified media type |
Methods inherited from interface org.apache.abdera.parser.Parser |
getDefaultParserOptions, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, setDefaultParserOptions |
Methods inherited from interface org.apache.abdera.util.NamedItem |
getName |
getInputFormats
String[] getInputFormats()
- Returns a listing of media type of the format consumed by this parser
- Returns:
- An array of MIME Media Types
parsesFormat
boolean parsesFormat(String mediatype)
- Returns true if this parser is capable of consuming the specified media type
- Parameters:
mediatype
- The MIME media type to check
- Returns:
- True if the media type is supported
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.