org.apache.abdera.util
Class AbderaConfiguration

java.lang.Object
  extended by org.apache.abdera.util.AbderaConfiguration
All Implemented Interfaces:
java.lang.Cloneable, Constants

public final class AbderaConfiguration
extends java.lang.Object
implements Constants, java.lang.Cloneable

Provides the basic configuration for the Abdera default implementation. This class should not be accessed by applications directly without very good reason.


Field Summary
 
Fields inherited from interface org.apache.abdera.util.Constants
ACCEPT, AID, APP_MEDIA_TYPE, APP_NS, APP_NS_PRE_RFC, APP_PREFIX, ATITLE, ATOM_MEDIA_TYPE, ATOM_NS, AURI, AUTHOR, BASE, CAT_MEDIA_TYPE, CATEGORIES, CATEGORY, CLASS, COLLECTION, CONFIG_FACTORY, CONFIG_PARSER, CONFIG_PARSERFACTORY, CONFIG_WRITER, CONFIG_WRITERFACTORY, CONFIG_XPATH, CONTENT, CONTRIBUTOR, CONTROL, CONTROL_NS, CONTROL_PREFIX, DEFAULT_FACTORY, DEFAULT_PARSER, DEFAULT_PARSERFACTORY, DEFAULT_WRITER, DEFAULT_WRITERFACTORY, DEFAULT_XPATH, DIV, DRAFT, EDITED, EMAIL, ENTRY, FEED, FIXED, GENERATOR, HREF, HREFLANG, HTML, ICON, ID, LABEL, LANG, LENGTH, LINK, LN_ACCEPT, LN_AUTHOR, LN_BASE, LN_CATEGORIES, LN_CATEGORY, LN_CLASS, LN_COLLECTION, LN_CONTENT, LN_CONTRIBUTOR, LN_CONTROL, LN_DIV, LN_DRAFT, LN_EDITED, LN_EMAIL, LN_ENTRY, LN_FEED, LN_FIXED, LN_GENERATOR, LN_HREF, LN_HREFLANG, LN_ICON, LN_ID, LN_LABEL, LN_LANG, LN_LENGTH, LN_LINK, LN_LOGO, LN_NAME, LN_PUBLISHED, LN_REL, LN_RIGHTS, LN_SCHEME, LN_SERVICE, LN_SOURCE, LN_SPACE, LN_SRC, LN_SUBTITLE, LN_SUMMARY, LN_TERM, LN_TITLE, LN_TYPE, LN_UPDATED, LN_URI, LN_VERSION, LN_WORKSPACE, LOGO, NAME, NAMED_PARSER, NAMED_WRITER, NO, PRE_RFC_ACCEPT, PRE_RFC_CATEGORIES, PRE_RFC_COLLECTION, PRE_RFC_CONTROL, PRE_RFC_DRAFT, PRE_RFC_EDITED, PRE_RFC_SERVICE, PRE_RFC_WORKSPACE, PREFIX, PREFIXED_TITLE, PUBLISHED, REL, RIGHTS, SCHEME, SERVICE, SOURCE, SPACE, SRC, SUBTITLE, SUMMARY, TERM, TEXT, TITLE, TYPE, UPDATED, URI, VERSION, WORKSPACE, XHTML, XHTML_NS, XML, XML_MEDIA_TYPE, XML_NS, YES
 
Constructor Summary
  AbderaConfiguration()
           
protected AbderaConfiguration(java.util.ResourceBundle bundle)
           
 
Method Summary
 void addExtensionFactory(ExtensionFactory factory)
          Registers an ExtensionFactory implementation.
 void addNamedParser(NamedParser parser)
          Registers a NamedParser implementation
 void addNamedWriter(NamedWriter writer)
          Registers a NamedWriter implementation
 java.lang.Object clone()
           
 java.lang.String getConfigurationOption(java.lang.String id)
          Retrieve the value of the specified configuration option
 java.lang.String getConfigurationOption(java.lang.String id, java.lang.String _default)
          Retrieve the value of the specified configuration option or _default if the value is null
static AbderaConfiguration getDefault()
          Returns the default configuration.
 java.lang.String getDefaultFactory()
          Returns the Java classname of the default Abdera Factory implementation
 java.lang.String getDefaultParser()
          Returns the Java classname of the default Abdera Parser implementation
 java.lang.String getDefaultParserFactory()
          Returns the Java classname of the default ParserFactory implementation
 java.lang.String getDefaultWriter()
          Returns the Java classname of the default Writer implementation
 java.lang.String getDefaultWriterFactory()
          Returns the Java classname of the default WriterFactory implementation
 java.lang.String getDefaultXPath()
          Returns the Java classname of the default Abdera XPath implementation
 java.util.List<ExtensionFactory> getExtensionFactories()
          Returns the listing of registered ExtensionFactory implementations
 java.util.Map<java.lang.String,NamedParser> getNamedParsers()
          Returns the collection of Named Parsers
 java.util.Map<java.lang.String,NamedWriter> getNamedWriters()
          Returns the collection of NamedWriters
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbderaConfiguration

public AbderaConfiguration()

AbderaConfiguration

protected AbderaConfiguration(java.util.ResourceBundle bundle)
Method Detail

getDefault

public static AbderaConfiguration getDefault()
Returns the default configuration. Every call to this method returns a new AbderaConfiguration instance using abdera.properties


getConfigurationOption

public java.lang.String getConfigurationOption(java.lang.String id)
Retrieve the value of the specified configuration option

Returns:
The configuration option value or null

getConfigurationOption

public java.lang.String getConfigurationOption(java.lang.String id,
                                               java.lang.String _default)
Retrieve the value of the specified configuration option or _default if the value is null

Returns:
The configuration option value of _default

getDefaultXPath

public java.lang.String getDefaultXPath()
Returns the Java classname of the default Abdera XPath implementation


getDefaultParser

public java.lang.String getDefaultParser()
Returns the Java classname of the default Abdera Parser implementation


getDefaultFactory

public java.lang.String getDefaultFactory()
Returns the Java classname of the default Abdera Factory implementation


getDefaultParserFactory

public java.lang.String getDefaultParserFactory()
Returns the Java classname of the default ParserFactory implementation


getDefaultWriterFactory

public java.lang.String getDefaultWriterFactory()
Returns the Java classname of the default WriterFactory implementation


getDefaultWriter

public java.lang.String getDefaultWriter()
Returns the Java classname of the default Writer implementation


addExtensionFactory

public void addExtensionFactory(ExtensionFactory factory)
Registers an ExtensionFactory implementation.


getExtensionFactories

public java.util.List<ExtensionFactory> getExtensionFactories()
Returns the listing of registered ExtensionFactory implementations


addNamedWriter

public void addNamedWriter(NamedWriter writer)
Registers a NamedWriter implementation


getNamedWriters

public java.util.Map<java.lang.String,NamedWriter> getNamedWriters()
Returns the collection of NamedWriters


addNamedParser

public void addNamedParser(NamedParser parser)
Registers a NamedParser implementation


getNamedParsers

public java.util.Map<java.lang.String,NamedParser> getNamedParsers()
Returns the collection of Named Parsers


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException