abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r592206 - in /incubator/abdera/java/trunk/core/src: main/java/org/apache/abdera/ main/java/org/apache/abdera/converter/ main/java/org/apache/abdera/util/ test/java/org/apache/abdera/test/core/
Date Tue, 06 Nov 2007 00:38:59 GMT
Author: jmsnell
Date: Mon Nov  5 16:38:58 2007
New Revision: 592206

URL: http://svn.apache.org/viewvc?rev=592206&view=rev
Log:
Part 2 of the AbderaConfiguration/Configuration refactoring.  This encapsulates all of the
configuration details into the implementation of the Configuration interface so that it can
be fully replaced.  Specifically, it removes the direct dependency that the Abdera class has
on the ServiceUtil helper class so that alternative ways of instantiating the default classes
can be used --- e.g. ways that don't involve crawling the classpath.  Spring users can likely
benefit from this immediately by creating a SpringConfiguration implementation that uses the
spring framework to specify the various implementations to use.  

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/converter/DefaultConversionContext.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/Configuration.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
    incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java?rev=592206&r1=592205&r2=592206&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java Mon Nov 
5 16:38:58 2007
@@ -27,8 +27,6 @@
 import org.apache.abdera.parser.ParserFactory;
 import org.apache.abdera.util.AbderaConfiguration;
 import org.apache.abdera.util.Configuration;
-import org.apache.abdera.util.Messages;
-import org.apache.abdera.util.ServiceUtil;
 import org.apache.abdera.writer.StreamWriter;
 import org.apache.abdera.writer.Writer;
 import org.apache.abdera.writer.WriterFactory;
@@ -209,7 +207,7 @@
    * @return A new factory instance
    */
   private Factory newFactory() {
-    return ServiceUtil.newFactoryInstance(this);
+    return config.newFactoryInstance(this);
   }
     
   /**
@@ -218,7 +216,7 @@
    * @return A new parser instance
    */
   private Parser newParser() {
-    return ServiceUtil.newParserInstance(this);
+    return config.newParserInstance(this);
   }
     
   /**
@@ -227,11 +225,7 @@
    * @return A new XPath instance
    */
   private XPath newXPath() {
-    try {
-      return ServiceUtil.newXPathInstance(this);
-    } catch (NoClassDefFoundError n) {
-      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","XPath"),n);
-    }
+    return config.newXPathInstance(this);
   }
     
   /**
@@ -240,11 +234,7 @@
    * @return A new ParserFactory instance
    */
   private ParserFactory newParserFactory() {
-    try {
-      return ServiceUtil.newParserFactoryInstance(this);
-    } catch (NoClassDefFoundError n) {
-      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","Parser"),n);
-    }
+    return config.newParserFactoryInstance(this);
   }
     
   /**
@@ -253,11 +243,7 @@
    * @return A new WriterFactory instance
    */
   private WriterFactory newWriterFactory() {
-    try {
-      return ServiceUtil.newWriterFactoryInstance(this);
-    } catch (NoClassDefFoundError n) {
-      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","WriterFactory"),n);
-    }
+    return config.newWriterFactoryInstance(this);
   }
     
   /**
@@ -266,11 +252,7 @@
    * @return A new default writer implementation instance
    */
   private Writer newWriter() {
-    try {
-      return ServiceUtil.newWriterInstance(this);
-    } catch (NoClassDefFoundError n) {
-      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","Writer"),n);
-    }
+    return config.newWriterInstance(this);
   }
   
   /**
@@ -279,11 +261,7 @@
    * @return A new default writer implementation instance
    */
   public StreamWriter newStreamWriter() {
-    try {
-      return ServiceUtil.newStreamWriterInstance(this);
-    } catch (NoClassDefFoundError n) {
-      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","StreamWriter"),n);
-    }
+    return config.newStreamWriterInstance(this);
   }  
   
   // Static convenience methods //

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/converter/DefaultConversionContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/converter/DefaultConversionContext.java?rev=592206&r1=592205&r2=592206&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/converter/DefaultConversionContext.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/converter/DefaultConversionContext.java
Mon Nov  5 16:38:58 2007
@@ -17,7 +17,6 @@
 */
 package org.apache.abdera.converter;
 
-import java.util.List;
 import java.util.Map;
 
 import org.apache.abdera.Abdera;
@@ -38,7 +37,7 @@
   }
   
   private void initConverters() {
-    List<ConverterProvider> providers = 
+    ConverterProvider[] providers = 
       getAbdera().getConfiguration().getConverterProviders();
     for (ConverterProvider provider : providers) {
       for (Map.Entry<Class<?>,Converter<?>> entry : provider) {

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java?rev=592206&r1=592205&r2=592206&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaConfiguration.java
Mon Nov  5 16:38:58 2007
@@ -26,11 +26,18 @@
 import java.util.Map;
 import java.util.ResourceBundle;
 
+import org.apache.abdera.Abdera;
 import org.apache.abdera.converter.ConverterProvider;
 import org.apache.abdera.factory.ExtensionFactory;
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.parser.NamedParser;
+import org.apache.abdera.parser.Parser;
+import org.apache.abdera.parser.ParserFactory;
 import org.apache.abdera.writer.NamedWriter;
 import org.apache.abdera.writer.StreamWriter;
+import org.apache.abdera.writer.Writer;
+import org.apache.abdera.writer.WriterFactory;
+import org.apache.abdera.xpath.XPath;
 
 /**
  * Provides the basic configuration for the Abdera default implementation.  This
@@ -73,13 +80,6 @@
   }
   
   private final ResourceBundle bundle;
-  private final String xpath;
-  private final String parser;
-  private final String factory;
-  private final String parserFactory;
-  private final String writerFactory;
-  private final String writer;
-  private final String streamwriter;
   private final List<ExtensionFactory> factories;
   private final List<ConverterProvider> providers;
   private final Map<String,NamedWriter> writers;
@@ -95,13 +95,6 @@
       AbderaConfiguration.getBundle(
         ServiceUtil.getClassLoader(), 
         Locale.getDefault());
-    xpath = getConfigurationOption(CONFIG_XPATH, DEFAULT_XPATH);
-    parser = getConfigurationOption(CONFIG_PARSER, DEFAULT_PARSER);
-    factory = getConfigurationOption(CONFIG_FACTORY, DEFAULT_FACTORY);
-    parserFactory = getConfigurationOption(CONFIG_PARSERFACTORY, DEFAULT_PARSERFACTORY);
-    writerFactory = getConfigurationOption(CONFIG_WRITERFACTORY, DEFAULT_WRITERFACTORY);
-    writer = getConfigurationOption(CONFIG_WRITER, DEFAULT_WRITER);
-    streamwriter = getConfigurationOption(CONFIG_STREAMWRITER, DEFAULT_STREAMWRITER);
     factories = ServiceUtil.loadExtensionFactories();
     providers = ServiceUtil.loadConverterProviders();
     writers = initNamedWriters();
@@ -140,55 +133,7 @@
     return (value != null) ? value : _default;
   }
   
-  /**
-   * Returns the Java classname of the default Abdera XPath implementation
-   */
-  public String getDefaultXPath() {
-    return xpath;
-  }
-  
-  /**
-   * Returns the Java classname of the default Abdera Parser implementation
-   */
-  public String getDefaultParser() {
-    return parser;
-  }
-  
-  /**
-   * Returns the Java classname of the default Abdera Factory implementation
-   */
-  public String getDefaultFactory() {
-    return factory;
-  }
-  
-  /**
-   * Returns the Java classname of the default ParserFactory implementation
-   */
-  public String getDefaultParserFactory() {
-    return parserFactory; 
-  }
-  
-  /**
-   * Returns the Java classname of the default WriterFactory implementation
-   */
-  public String getDefaultWriterFactory() {
-    return writerFactory;
-  }
-  
-  /**
-   * Returns the Java classname of the default Writer implementation
-   */
-  public String getDefaultWriter() {
-    return writer;
-  }
-
-  /**
-   * Returns the Java classname of the default StreamWriter implementation
-   */
-  public String getDefaultStreamWriter() {
-    return streamwriter;
-  }
-  
+ 
   /**
    * Registers an ExtensionFactory implementation.
    */
@@ -208,8 +153,11 @@
   /**
    * Returns the listing of registered ConverterProvider implementations
    */
-  public List<ConverterProvider> getConverterProviders() {
-    return providers;
+  public ConverterProvider[] getConverterProviders() {
+    return providers != null ? 
+      providers.toArray(
+        new ConverterProvider[providers.size()]) : 
+          new ConverterProvider[0];
   }
   
   /**
@@ -245,18 +193,24 @@
       ServiceUtil._loadimpls(STREAM_WRITER,true);
     writers = Collections.synchronizedMap(new HashMap<String,Class<? extends StreamWriter>>());
     for (Class<? extends StreamWriter> writer : _writers) {
-      try {
-        Field field = writer.getField("NAME");
-        if (Modifier.isStatic(field.getModifiers())) {
-          String name = (String)field.get(null);
-          if (name != null)
-            writers.put(name.toLowerCase(), writer);
-        }
-      } catch (Exception e) {}
+      String name = getName(writer);
+      if (name != null)
+        writers.put(name.toLowerCase(), writer);
     }
     return writers;
   }
   
+  private static String getName(Class<? extends StreamWriter> sw) {
+    String name = null;
+    try {
+      Field field = sw.getField("NAME");
+      if (Modifier.isStatic(field.getModifiers())) {
+        name = (String)field.get(null);
+      }
+    } catch (Exception e) {}
+    return name;
+  }
+  
   /**
    * Returns the collection of NamedWriters
    */
@@ -278,6 +232,13 @@
     Map<String,NamedParser> parsers = getNamedParsers();
     parsers.put(parser.getName(), parser);
   }
+
+  /**
+   * Registers a StreamWriter implementation
+   */
+  public void addStreamWriter(Class<? extends StreamWriter> sw) {
+    getStreamWriters().put(getName(sw), sw);
+  }
   
   /**
    * Registers NamedParser implementations using 
@@ -309,4 +270,88 @@
     }
   }
   
+  
+  /**
+   * Return a new instance of org.apache.abdera.factory.Factory
+   * 
+   * @return A new factory instance
+   */
+  public Factory newFactoryInstance(Abdera abdera) {
+    return ServiceUtil.newFactoryInstance(abdera);
+  }
+    
+  /**
+   * Return a new instance of org.apache.abdera.parser.Parser
+   * 
+   * @return A new parser instance
+   */
+  public Parser newParserInstance(Abdera abdera) {
+    return ServiceUtil.newParserInstance(abdera);
+  }
+    
+  /**
+   * Return a new instance of org.apache.abdera.xpath.XPath
+   * 
+   * @return A new XPath instance
+   */
+  public XPath newXPathInstance(Abdera abdera) {
+    try {
+      return ServiceUtil.newXPathInstance(abdera);
+    } catch (NoClassDefFoundError n) {
+      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","XPath"),n);
+    }
+  }
+    
+  /**
+   * Return a new instance of org.apache.abdera.parser.ParserFactory
+   * 
+   * @return A new ParserFactory instance
+   */
+  public ParserFactory newParserFactoryInstance(Abdera abdera) {
+    try {
+      return ServiceUtil.newParserFactoryInstance(abdera);
+    } catch (NoClassDefFoundError n) {
+      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","Parser"),n);
+    }
+  }
+    
+  /**
+   * Return a new instance of org.apache.abdera.writer.WriterFactory
+   * 
+   * @return A new WriterFactory instance
+   */
+  public WriterFactory newWriterFactoryInstance(Abdera abdera) {
+    try {
+      return ServiceUtil.newWriterFactoryInstance(abdera);
+    } catch (NoClassDefFoundError n) {
+      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","WriterFactory"),n);
+    }
+  }
+    
+  /**
+   * Return a new instance of the default org.apache.abdera.writer.Writer
+   * 
+   * @return A new default writer implementation instance
+   */
+  public Writer newWriterInstance(Abdera abdera) {
+    try {
+      return ServiceUtil.newWriterInstance(abdera);
+    } catch (NoClassDefFoundError n) {
+      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","Writer"),n);
+    }
+  }
+  
+  /**
+   * Return a new instance of the default org.apache.abdera.writer.Writer
+   * 
+   * @return A new default writer implementation instance
+   */
+  public StreamWriter newStreamWriterInstance(Abdera abdera) {
+    try {
+      return ServiceUtil.newStreamWriterInstance(abdera);
+    } catch (NoClassDefFoundError n) {
+      throw new RuntimeException(Messages.format("IMPLEMENTATION.NOT.AVAILABLE","StreamWriter"),n);
+    }
+  }  
+
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/Configuration.java?rev=592206&r1=592205&r2=592206&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/Configuration.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/Configuration.java
Mon Nov  5 16:38:58 2007
@@ -21,11 +21,18 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.abdera.Abdera;
 import org.apache.abdera.converter.ConverterProvider;
 import org.apache.abdera.factory.ExtensionFactory;
+import org.apache.abdera.factory.Factory;
 import org.apache.abdera.parser.NamedParser;
+import org.apache.abdera.parser.Parser;
+import org.apache.abdera.parser.ParserFactory;
 import org.apache.abdera.writer.NamedWriter;
 import org.apache.abdera.writer.StreamWriter;
+import org.apache.abdera.writer.Writer;
+import org.apache.abdera.writer.WriterFactory;
+import org.apache.abdera.xpath.XPath;
 
 public interface Configuration 
   extends Cloneable, Serializable {
@@ -42,82 +49,67 @@
    * @return The configuration option value of _default
    */
   public abstract String getConfigurationOption(String id, String _default);
-  
-  /**
-   * Returns the Java classname of the default Abdera XPath implementation
-   */
-  public abstract String getDefaultXPath();
-  
-  /**
-   * Returns the Java classname of the default Abdera Parser implementation
-   */
-  public abstract String getDefaultParser();
-  
+    
   /**
-   * Returns the Java classname of the default Abdera Factory implementation
+   * Get a new instance of the default Factory impl
    */
-  public abstract String getDefaultFactory();
+  public Factory newFactoryInstance(Abdera abdera);
   
   /**
-   * Returns the Java classname of the default ParserFactory implementation
+   * Get a new instance of the default Parser impl
    */
-  public abstract String getDefaultParserFactory();
+  public Parser newParserInstance(Abdera abdera);
   
   /**
-   * Returns the Java classname of the default WriterFactory implementation
+   * Get a new instance of the default XPath impl
    */
-  public abstract String getDefaultWriterFactory();
+  public XPath newXPathInstance(Abdera abdera);
   
   /**
-   * Returns the Java classname of the default Writer implementation
+   * Get a new instance of the default ParserFactory impl
    */
-  public abstract String getDefaultWriter();
+  public ParserFactory newParserFactoryInstance(Abdera abdera);
   
   /**
-   * Returns the Java classname of the default StreamWriter implementation
+   * Get a new instance of the default WriterFactory impl
    */
-  public abstract String getDefaultStreamWriter();
+  public WriterFactory newWriterFactoryInstance(Abdera abdera);
   
   /**
-   * Registers an ExtensionFactory implementation.
+   * Get a new instance of the default Writer impl
    */
-  public abstract void addExtensionFactory(ExtensionFactory factory);
+  public Writer newWriterInstance(Abdera abdera);
   
   /**
-   * Returns the listing of registered ExtensionFactory implementations
+   * Get a new instance of the default StreamWriter impl
    */
-  public abstract List<ExtensionFactory> getExtensionFactories();
+  public StreamWriter newStreamWriterInstance(Abdera abdera);
   
   /**
-   * Returns the listing of registered ConverterProvider implementations
+   * Get a listing of ConverterProviders
    */
-  public abstract List<ConverterProvider> getConverterProviders();
+  public ConverterProvider[] getConverterProviders();
   
   /**
-   * Registers a NamedWriter implementation
+   * Get the collection of NamedParsers;
    */
-  public abstract void addNamedWriter(NamedWriter writer);
+  public Map<String,NamedParser> getNamedParsers();
   
   /**
-   * Returns the collection of NamedWriters
+   * Get the collection of NamedWriters
    */
-  public abstract Map<String, NamedWriter> getNamedWriters();
+  public Map<String,NamedWriter> getNamedWriters();
   
   /**
-   * Returns the collection of NamedWriters
+   * Get the collection of Named StreamWriters
    */
-  public abstract Map<String, Class<? extends StreamWriter>> getStreamWriters();
+  public Map<String,Class<? extends StreamWriter>> getStreamWriters();
   
   /**
-   * Registers a NamedParser implementation
+   * Get the collection of ExtensionFactory impls
    */
-  public abstract void addNamedParser(NamedParser parser);
+  public List<ExtensionFactory> getExtensionFactories();
   
-  /**
-   * Returns the collection of Named Parsers
-   */
-  public abstract Map<String, NamedParser> getNamedParsers();
   
   public abstract Object clone();
-  
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java?rev=592206&r1=592205&r2=592206&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/ServiceUtil.java
Mon Nov  5 16:38:58 2007
@@ -77,7 +77,7 @@
   public static XPath newXPathInstance(Abdera abdera) {
     return (XPath) newInstance(
       CONFIG_XPATH,
-      abdera.getConfiguration().getDefaultXPath(), 
+      abdera.getConfiguration().getConfigurationOption(CONFIG_XPATH, DEFAULT_XPATH), 
       abdera);
   }
   
@@ -87,7 +87,7 @@
   public static Parser newParserInstance(Abdera abdera) {
     return (Parser) newInstance(
       CONFIG_PARSER, 
-      abdera.getConfiguration().getDefaultParser(),
+      abdera.getConfiguration().getConfigurationOption(CONFIG_PARSER, DEFAULT_PARSER),
       abdera);
   }
 
@@ -97,35 +97,35 @@
   public static Factory newFactoryInstance(Abdera abdera) {
     return (Factory) newInstance(
       CONFIG_FACTORY, 
-      abdera.getConfiguration().getDefaultFactory(),
+      abdera.getConfiguration().getConfigurationOption(CONFIG_FACTORY, DEFAULT_FACTORY),
       abdera);
   }
   
   public static ParserFactory newParserFactoryInstance(Abdera abdera) {
     return (ParserFactory) newInstance(
       CONFIG_PARSERFACTORY,
-      abdera.getConfiguration().getDefaultParserFactory(),
+      abdera.getConfiguration().getConfigurationOption(CONFIG_PARSERFACTORY, DEFAULT_PARSERFACTORY),
       abdera);
   }
   
   public static WriterFactory newWriterFactoryInstance(Abdera abdera) {
     return (WriterFactory) newInstance(
       CONFIG_WRITERFACTORY,
-      abdera.getConfiguration().getDefaultWriterFactory(),
+      abdera.getConfiguration().getConfigurationOption(CONFIG_WRITERFACTORY, DEFAULT_WRITERFACTORY),
       abdera) ;
   }
   
   public static Writer newWriterInstance(Abdera abdera) {
     return (Writer) newInstance(
       CONFIG_WRITER,
-      abdera.getConfiguration().getDefaultWriter(),
+      abdera.getConfiguration().getConfigurationOption(CONFIG_WRITER, DEFAULT_WRITER),
       abdera);
   }
   
   public static StreamWriter newStreamWriterInstance(Abdera abdera) {
     return (StreamWriter) newInstance(
       CONFIG_STREAMWRITER,
-      abdera.getConfiguration().getDefaultStreamWriter(),
+      abdera.getConfiguration().getConfigurationOption(CONFIG_STREAMWRITER, DEFAULT_STREAMWRITER),
       abdera);    
   }
   

Modified: incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java?rev=592206&r1=592205&r2=592206&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
(original)
+++ incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
Mon Nov  5 16:38:58 2007
@@ -62,23 +62,24 @@
 import org.apache.abdera.util.AbderaConfiguration;
 import org.apache.abdera.util.CompressionUtil;
 import org.apache.abdera.util.Configuration;
+import org.apache.abdera.util.Constants;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.abdera.util.URIHelper;
 import org.apache.abdera.util.XmlRestrictedCharReader;
 import org.apache.abdera.writer.WriterOptions;
 
-public class CoreTest extends TestCase {
+public class CoreTest extends TestCase implements Constants {
 
   public static void testDefaultConfigurationProperties() {
     Configuration config = new AbderaConfiguration();
     assertEquals(
-      config.getDefaultFactory(), 
+      config.getConfigurationOption(CONFIG_FACTORY, DEFAULT_FACTORY), 
       "org.apache.abdera.parser.stax.FOMFactory");
     assertEquals(
-      config.getDefaultParser(),
+      config.getConfigurationOption(CONFIG_PARSER, DEFAULT_PARSER),
       "org.apache.abdera.parser.stax.FOMParser");
     assertEquals(
-      config.getDefaultXPath(),
+      config.getConfigurationOption(CONFIG_XPATH, DEFAULT_XPATH),
       "org.apache.abdera.parser.stax.FOMXPath");
   }
   



Mime
View raw message