Class AbderaConfiguration

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Configuration, Constants

    public final class AbderaConfiguration
    extends java.lang.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
    • Constructor Detail

      • AbderaConfiguration

        public AbderaConfiguration()
    • 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 java.lang.String getConfigurationOption​(java.lang.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 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
        Specified by:
        getConfigurationOption in interface Configuration
        Returns:
        The configuration option value of _default
      • getStreamWriters

        public java.util.Map<java.lang.String,​java.lang.Class<? extends StreamWriter>> getStreamWriters()
        Returns the collection of NamedWriters
        Specified by:
        getStreamWriters in interface Configuration
      • addNamedParser

        public AbderaConfiguration addNamedParser​(org.apache.abdera.parser.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​(java.lang.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 java.util.Map<java.lang.String,​org.apache.abdera.parser.NamedParser> getNamedParsers()
        Returns the collection of Named Parsers
        Specified by:
        getNamedParsers in interface Configuration
      • clone

        public java.lang.Object clone()
        Specified by:
        clone in interface Configuration
      • 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 org.apache.abdera.parser.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 org.apache.abdera.parser.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
      • 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