org.apache.abdera.util
Class AbstractNamedParser
java.lang.Object
org.apache.abdera.util.AbstractParser
org.apache.abdera.util.AbstractNamedParser
- All Implemented Interfaces:
- NamedParser, Parser
public abstract class AbstractNamedParser
- extends AbstractParser
- implements NamedParser
Base abstract implementation of NamedParser
Field Summary |
protected java.lang.String[] |
formats
|
protected java.lang.String |
name
|
Constructor Summary |
protected |
AbstractNamedParser(java.lang.String name,
java.lang.String... formats)
|
Method Summary |
java.lang.String[] |
getInputFormats()
Returns a listing of media type of the format consumed by this parser |
java.lang.String |
getName()
Returns the name used to retrieve this parser (case insensitive) |
boolean |
parsesFormat(java.lang.String mediatype)
Returns true if this parser is capable of consuming the specified media type |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected final java.lang.String name
formats
protected final java.lang.String[] formats
AbstractNamedParser
protected AbstractNamedParser(java.lang.String name,
java.lang.String... formats)
getName
public java.lang.String getName()
- Description copied from interface:
NamedParser
- Returns the name used to retrieve this parser (case insensitive)
- Specified by:
getName
in interface NamedParser
- Returns:
- The name of this parser
getInputFormats
public java.lang.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(java.lang.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