org.apache.abdera.util
Class AbstractNamedParser

java.lang.Object
  extended by org.apache.abdera.util.AbstractParser
      extended by org.apache.abdera.util.AbstractNamedParser
All Implemented Interfaces:
NamedParser, Parser, NamedItem
Direct Known Subclasses:
HtmlParser

public abstract class AbstractNamedParser
extends AbstractParser
implements NamedParser

Base abstract implementation of NamedParser


Field Summary
protected  String[] formats
           
protected  String name
           
 
Fields inherited from class org.apache.abdera.util.AbstractParser
abdera, options
 
Constructor Summary
protected AbstractNamedParser(Abdera abdera, String name, String... formats)
           
 
Method Summary
 String[] getInputFormats()
          Returns a listing of media type of the format consumed by this parser
 String getName()
           
 boolean parsesFormat(String mediatype)
          Returns true if this parser is capable of consuming the specified media type
 
Methods inherited from class org.apache.abdera.util.AbstractParser
getAbdera, getDefaultParserOptions, getFactory, initDefaultParserOptions, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, setAbdera, setDefaultParserOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Field Detail

name

protected final String name

formats

protected final String[] formats
Constructor Detail

AbstractNamedParser

protected AbstractNamedParser(Abdera abdera,
                              String name,
                              String... formats)
Method Detail

getName

public String getName()
Specified by:
getName in interface NamedItem

getInputFormats

public String[] getInputFormats()
Description copied from interface: NamedParser
Returns a listing of media type of the format consumed by this parser

Specified by:
getInputFormats in interface NamedParser
Returns:
An array of MIME Media Types

parsesFormat

public boolean parsesFormat(String mediatype)
Description copied from interface: NamedParser
Returns true if this parser is capable of consuming the specified media type

Specified by:
parsesFormat in interface NamedParser
Parameters:
mediatype - The MIME media type to check
Returns:
True if the media type is supported


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.