org.apache.abdera.util
Class AbderaConfiguration

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

public final class AbderaConfiguration
extends Object
implements Constants, Configuration

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.abdera.util.Constants
ACCEPT, AID, ALTERNATE, 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_STREAMWRITER, CONFIG_WRITER, CONFIG_WRITERFACTORY, CONFIG_XPATH, CONTENT, CONTRIBUTOR, CONTROL, CONTROL_NS, CONTROL_PREFIX, DEFAULT_FACTORY, DEFAULT_PARSER, DEFAULT_PARSERFACTORY, DEFAULT_STREAMWRITER, DEFAULT_WRITER, DEFAULT_WRITERFACTORY, DEFAULT_XPATH, DIV, DRAFT, EDITED, EMAIL, ENTRY, ENTRY_MEDIA_TYPE, FEED, FEED_MEDIA_TYPE, FIXED, GENERATOR, HREF, HREFLANG, HTML, ICON, ID, LABEL, LANG, LENGTH, LINK, LN_ACCEPT, LN_ALTERNATE, LN_ALTERNATE_MULTIPART_RELATED, 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, MULTIPART_RELATED_TYPE, 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, STREAM_WRITER, 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(ResourceBundle bundle)
           
 
Method Summary
 AbderaConfiguration addExtensionFactory(ExtensionFactory factory)
          Registers an ExtensionFactory implementation.
 AbderaConfiguration addNamedParser(NamedParser parser)
          Registers a NamedParser implementation
 AbderaConfiguration addNamedWriter(NamedWriter writer)
          Registers a NamedWriter implementation
 AbderaConfiguration addStreamWriter(Class<? extends StreamWriter> sw)
          Registers a StreamWriter implementation
 Object clone()
           
 String getConfigurationOption(String id)
          Retrieve the value of the specified configuration option
 String getConfigurationOption(String id, String _default)
          Retrieve the value of the specified configuration option or _default if the value is null
static Configuration getDefault()
          Returns the default configuration.
 List<ExtensionFactory> getExtensionFactories()
          Returns the listing of registered ExtensionFactory implementations
 Map<String,NamedParser> getNamedParsers()
          Returns the collection of Named Parsers
 Map<String,NamedWriter> getNamedWriters()
          Returns the collection of NamedWriters
 Map<String,Class<? extends StreamWriter>> getStreamWriters()
          Returns the collection of NamedWriters
 Factory newFactoryInstance(Abdera abdera)
          Return a new instance of org.apache.abdera.factory.Factory
 ParserFactory newParserFactoryInstance(Abdera abdera)
          Return a new instance of org.apache.abdera.parser.ParserFactory
 Parser newParserInstance(Abdera abdera)
          Return a new instance of org.apache.abdera.parser.Parser
 StreamWriter newStreamWriterInstance(Abdera abdera)
          Return a new instance of the default org.apache.abdera.writer.Writer
 WriterFactory newWriterFactoryInstance(Abdera abdera)
          Return a new instance of org.apache.abdera.writer.WriterFactory
 Writer newWriterInstance(Abdera abdera)
          Return a new instance of the default org.apache.abdera.writer.Writer
 XPath newXPathInstance(Abdera abdera)
          Return a new instance of org.apache.abdera.xpath.XPath
 
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(ResourceBundle bundle)
Method Detail

getDefault

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


getConfigurationOption

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

Specified by:
getConfigurationOption in interface Configuration
Returns:
The configuration option value or null

getConfigurationOption

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

Specified by:
getConfigurationOption in interface Configuration
Returns:
The configuration option value of _default

addExtensionFactory

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

Specified by:
addExtensionFactory in interface Configuration
Parameters:
factory - is the new ExtensionFactory to add
Returns:
the instance of the configuration class

getExtensionFactories

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

Specified by:
getExtensionFactories in interface Configuration

addNamedWriter

public AbderaConfiguration addNamedWriter(NamedWriter writer)
Registers a NamedWriter implementation

Specified by:
addNamedWriter in interface Configuration
Parameters:
writer - is the new NamedWriter to add
Returns:
the instance of the configuration class

getNamedWriters

public Map<String,NamedWriter> getNamedWriters()
Returns the collection of NamedWriters

Specified by:
getNamedWriters in interface Configuration

getStreamWriters

public Map<String,Class<? extends StreamWriter>> getStreamWriters()
Returns the collection of NamedWriters

Specified by:
getStreamWriters in interface Configuration

addNamedParser

public AbderaConfiguration addNamedParser(NamedParser parser)
Registers a NamedParser implementation

Specified by:
addNamedParser in interface Configuration
Parameters:
parser - is the new NamedParser to add
Returns:
the instance of the configuration class

addStreamWriter

public AbderaConfiguration addStreamWriter(Class<? extends StreamWriter> sw)
Registers a StreamWriter implementation

Specified by:
addStreamWriter in interface Configuration
Parameters:
sw - is the new StreamWriter to add
Returns:
the instance of the configuration class

getNamedParsers

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

Specified by:
getNamedParsers in interface Configuration

clone

public Object clone()
Specified by:
clone in interface Configuration
Overrides:
clone in class Object

newFactoryInstance

public Factory newFactoryInstance(Abdera abdera)
Return a new instance of org.apache.abdera.factory.Factory

Specified by:
newFactoryInstance in interface Configuration
Returns:
A new factory instance

newParserInstance

public Parser newParserInstance(Abdera abdera)
Return a new instance of org.apache.abdera.parser.Parser

Specified by:
newParserInstance in interface Configuration
Returns:
A new parser instance

newXPathInstance

public XPath newXPathInstance(Abdera abdera)
Return a new instance of org.apache.abdera.xpath.XPath

Specified by:
newXPathInstance in interface Configuration
Returns:
A new XPath instance

newParserFactoryInstance

public ParserFactory newParserFactoryInstance(Abdera abdera)
Return a new instance of org.apache.abdera.parser.ParserFactory

Specified by:
newParserFactoryInstance in interface Configuration
Returns:
A new ParserFactory instance

newWriterFactoryInstance

public WriterFactory newWriterFactoryInstance(Abdera abdera)
Return a new instance of org.apache.abdera.writer.WriterFactory

Specified by:
newWriterFactoryInstance in interface Configuration
Returns:
A new WriterFactory instance

newWriterInstance

public Writer newWriterInstance(Abdera abdera)
Return a new instance of the default org.apache.abdera.writer.Writer

Specified by:
newWriterInstance in interface Configuration
Returns:
A new default writer implementation instance

newStreamWriterInstance

public StreamWriter newStreamWriterInstance(Abdera abdera)
Return a new instance of the default org.apache.abdera.writer.Writer

Specified by:
newStreamWriterInstance in interface Configuration
Returns:
A new default writer implementation instance


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