- made a producer for startpages per topic
authorzapata <zapata>
Wed, 1 May 2002 04:33:14 +0000 (04:33 +0000)
committerzapata <zapata>
Wed, 1 May 2002 04:33:14 +0000 (04:33 +0000)
14 files changed:
source/mir/entity/EntityBrowser.java
source/mir/util/ParameterExpander.java [new file with mode: 0755]
source/mircoders/global/MirGlobal.java
source/mircoders/localizer/MirCachingLocalizerDecorator.java [new file with mode: 0755]
source/mircoders/localizer/MirProducerToolLocalizer.java
source/mircoders/localizer/basic/MirBasicProducerLocalizer.java
source/mircoders/localizer/basic/MirBasicProducerToolLocalizer.java
source/mircoders/producer/ContentProducer.java
source/mircoders/producer/ContentProducerFactory.java
source/mircoders/producer/NullProducer.java [new file with mode: 0755]
source/mircoders/producer/NullProducerFactory.java [new file with mode: 0755]
source/mircoders/producer/ScriptCallProducer.java
source/mircoders/producer/StartPageProducer.java
source/mircoders/producer/TopicStartPageProducerFactory.java [new file with mode: 0755]

index 192ee14..aa3f3cc 100755 (executable)
@@ -40,7 +40,6 @@ public class EntityBrowser {
     }\r
   }\r
 \r
-\r
   public boolean hasNext() throws StorageObjectException {\r
     if (position>=currentBatch.size() && currentBatch.hasNextBatch()) {\r
       readNextBatch();\r
diff --git a/source/mir/util/ParameterExpander.java b/source/mir/util/ParameterExpander.java
new file mode 100755 (executable)
index 0000000..bb677d7
--- /dev/null
@@ -0,0 +1,104 @@
+package  mir.util;
+
+import java.util.*;
+
+public class ParameterExpander {
+
+  final static String DEFAULT_KEY = "(default)";
+  final static String NODE_SEPARATOR = ".";
+
+  private static List splitString(String aString, String aSeparator) {
+    List result= new Vector();
+    int previousPosition = 0;
+    int position;
+    int endOfNamePosition;
+
+    while ((position = aString.indexOf(aSeparator, previousPosition))>=0) {
+      result.add(aString.substring(previousPosition, position));
+      previousPosition = position + aSeparator.length();
+    }
+
+    result.add(aString.substring(previousPosition, aString.length()));
+
+    return result;
+  }
+
+  public static String findValueForKey(Map aMap, String aKey) throws Exception {
+    Object node;
+    Iterator i;
+    List parts = splitString(aKey, NODE_SEPARATOR);
+    String location = "";
+
+    node = aMap;
+
+    i = parts.iterator();
+
+    while(i.hasNext()) {
+      String part = (String) i.next();
+
+      if (!(node instanceof Map)) {
+        throw new Exception( "Can't expand key " + aKey + ": " + location + " is not a map" );
+      }
+
+      node = ((Map) node).get(part);
+
+      if (location.length()>0) {
+        location=location + NODE_SEPARATOR;
+      }
+
+      location = location + part;
+
+      if (node == null) {
+        throw new Exception( "Can't expand key " + aKey + ": "+ location + " does not exist" );
+      }
+    }
+
+    if (node instanceof Map) {
+      node = ((Map) node).get(DEFAULT_KEY);
+    }
+
+    if (!(node instanceof String))
+      throw new Exception( "Can't expand key " + aKey + ": "+ location + " is not a string but a " + node.getClass().getName() );
+
+    return (String) node;
+  }
+
+  public static String expandExpression(Map aMap, String anExpression) throws Exception {
+    int previousPosition = 0;
+    int position;
+    int endOfNamePosition;
+    StringBuffer result = new StringBuffer();
+
+    while ((position=anExpression.indexOf("$", previousPosition))>=0) {
+      result.append(anExpression.substring(previousPosition, position));
+
+      if (position>=anExpression.length()-1) {
+        result.append(anExpression.substring(position, anExpression.length()));
+        previousPosition=anExpression.length();
+      }
+      else
+      {
+        if (anExpression.charAt(position+1) == '{') {
+          endOfNamePosition=anExpression.indexOf('}', position);
+          if (endOfNamePosition>=0) {
+            result.append(findValueForKey(aMap, anExpression.substring(position+2, endOfNamePosition)));
+            previousPosition=endOfNamePosition+1;
+          }
+          else {
+              throw new Exception("Missing } in " + anExpression);
+          }
+        }
+        else
+        {
+          previousPosition=position+2;
+          result.append(anExpression.charAt(position+1));
+        }
+      }
+    }
+    result.append(anExpression.substring(previousPosition, anExpression.length()));
+
+    return result.toString();
+  }
+}
+
+
index bd23556..cbbea02 100755 (executable)
@@ -13,7 +13,7 @@ public class MirGlobal {
 
   public static MirLocalizer localizer() {
     if (localizer == null ) {
-      localizer = new MirBasicLocalizer();
+      localizer = new MirCachingLocalizerDecorator(new MirBasicLocalizer());
     }
 
     return localizer;
diff --git a/source/mircoders/localizer/MirCachingLocalizerDecorator.java b/source/mircoders/localizer/MirCachingLocalizerDecorator.java
new file mode 100755 (executable)
index 0000000..8b16b05
--- /dev/null
@@ -0,0 +1,46 @@
+package mircoders.localizer;
+
+public class MirCachingLocalizerDecorator implements MirLocalizer {
+  private MirLocalizer localizer;
+  private MirProducerLocalizer producerLocalizer;
+  private MirGeneratorLocalizer generatorLocalizer;
+  private MirOpenPostingLocalizer openPostingsLocalizer;
+  private MirProducerToolLocalizer producerToolLocalizer;
+
+  public MirCachingLocalizerDecorator(MirLocalizer aLocalizer) {
+    localizer = aLocalizer;
+  }
+
+  public MirProducerLocalizer producers() {
+    if (producerLocalizer==null) {
+      producerLocalizer = localizer.producers();
+    }
+
+    return producerLocalizer;
+  }
+
+  public MirGeneratorLocalizer generators() {
+    if (generatorLocalizer==null) {
+      generatorLocalizer = localizer.generators();
+    }
+
+    return generatorLocalizer;
+  }
+
+  public MirOpenPostingLocalizer openPostings() {
+    if (openPostingsLocalizer==null) {
+      openPostingsLocalizer = localizer.openPostings();
+    }
+
+    return openPostingsLocalizer;
+  }
+
+  public MirProducerToolLocalizer producerTool() {
+    if (producerToolLocalizer==null) {
+      producerToolLocalizer = localizer.producerTool();
+    }
+
+    return producerToolLocalizer;
+  }
+
+}
\ No newline at end of file
index 3fa3d8c..8bebd11 100755 (executable)
@@ -1,4 +1,7 @@
 package mircoders.localizer;
 
+import java.util.*;
+
 public interface MirProducerToolLocalizer {
+  public void initializeGenerationValueSet(Map aValueSet);
 }
index 00c1f0e..c5cacee 100755 (executable)
@@ -24,19 +24,27 @@ public class MirBasicProducerLocalizer implements MirProducerLocalizer {
       new ContentProducerFactory(
       MirGlobal.getConfigProperty("Producer.Content.Template"),
       "bundles.admin",
-      MirGlobal.getConfigProperty("Producer.StorageRoot"),
-      ".shtml",
+      MirGlobal.getConfigProperty("Producer.StorageRoot") + "/${contentyear}/${contentmonth}/${contentid}.shtml",
       Integer.parseInt(MirGlobal.getConfigProperty("Producer.Content.Batchsize"))));
   }
 
   protected void setupStartPageFactory(CompositeProducerFactory aStartPageFactory) {
     aStartPageFactory.addFactory(
       new StartPageProducerFactory(
-      MirGlobal.getConfigProperty("Producer.StartPage.Template"),
-      "bundles.admin",
-      MirGlobal.getConfigProperty("Producer.StorageRoot") + "/index.shtml",
-      MirGlobal.getConfigIntegerProperty("Producer.StartPage.Items"),
-      MirGlobal.getConfigIntegerProperty("Producer.StartPage.Newswire")));
+          MirGlobal.getConfigProperty("Producer.StartPage.Template"),
+          "bundles.admin",
+          MirGlobal.getConfigProperty("Producer.StorageRoot") + "/index.shtml",
+          MirGlobal.getConfigIntegerProperty("Producer.StartPage.Items"),
+          MirGlobal.getConfigIntegerProperty("Producer.StartPage.Newswire")));
+
+
+    aStartPageFactory.addFactory(
+      new TopicStartPageProducerFactory(
+          MirGlobal.getConfigProperty("Producer.StartPage.Template"),
+          "bundles.admin",
+          MirGlobal.getConfigProperty("Producer.StorageRoot") + "/${filename}index.shtml",
+          MirGlobal.getConfigIntegerProperty("Producer.StartPage.Items"),
+          MirGlobal.getConfigIntegerProperty("Producer.StartPage.Newswire")));
   }
 
   protected void setupSynchronizationFactory(CompositeProducerFactory aSynchronizationFactory) {
@@ -67,11 +75,11 @@ public class MirBasicProducerLocalizer implements MirProducerLocalizer {
     setupSynchronizationFactory(factory);
     aFactoriesMap.put("synchronization", factory);
 
-    aFactoriesMap.put("oldstartpage", new OldProducerAdapterFactory(new ProducerStartPage()));
+
+
     aFactoriesMap.put("images", new OldProducerAdapterFactory(new ProducerImages()));
     aFactoriesMap.put("navigation", new OldProducerAdapterFactory(new ProducerNavigation()));
     aFactoriesMap.put("openposting", new OldProducerAdapterFactory(new ProducerOpenPosting()));
     aFactoriesMap.put("topics", new OldProducerAdapterFactory(new ProducerTopics()));
-
   };
 }
index a04bff9..1780124 100755 (executable)
@@ -1,6 +1,31 @@
 package mircoders.localizer.basic;
 
+import java.util.*;
+import freemarker.template.utility.*;
+import mir.misc.*;
 import mircoders.localizer.*;
+import mircoders.global.*;
 
 public class MirBasicProducerToolLocalizer implements MirProducerToolLocalizer {
+
+  public void initializeGenerationValueSet(Map aValueSet) {
+    // ML: these config settings will be included more beautifully as soon as the new config system is in place
+
+    Map configMap = new HashMap();
+
+               configMap.put("producerDocRoot", MirGlobal.getConfigProperty("Producer.DocRoot"));
+               configMap.put("storageRoot", MirGlobal.getConfigProperty("Producer.StorageRoot"));
+    configMap.put("productionHost", MirGlobal.getConfigProperty("Producer.ProductionHost"));
+               configMap.put("openAction", MirGlobal.getConfigProperty("Producer.OpenAction"));
+               configMap.put("docRoot", MirGlobal.getConfigProperty("RootUri"));
+               configMap.put("now", StringUtil.date2readableDateTime(new GregorianCalendar()));
+               configMap.put("videoHost", MirGlobal.getConfigProperty("Producer.Video.Host"));
+               configMap.put("audioHost", MirGlobal.getConfigProperty("Producer.Audio.Host"));
+               configMap.put("imageHost", MirGlobal.getConfigProperty("Producer.Image.Host"));
+               configMap.put("imagePath", MirGlobal.getConfigProperty("Producer.Image.Path"));
+               configMap.put("mirVersion", MirGlobal.getConfigProperty("Mir.Version"));
+               configMap.put("compressWhitespace", new freemarker.template.utility.CompressWhitespace() );
+
+    aValueSet.put("config", configMap);
+  };
 }
index 428331b..5790063 100755 (executable)
@@ -3,6 +3,7 @@ package mircoders.producer;
 import java.io.*;
 import java.util.*;
 
+import mir.util.*;
 import mir.misc.*;
 import mir.entity.*;
 import mir.producer.*;
@@ -21,8 +22,8 @@ public class ContentProducer implements mir.producer.Producer {
   private String generatorIdentifier;
   private String resourceBundle;
 
-  private String outputFilePrefix;
-  private String outputFilePostfix;
+  private String outputFileExpression;
+
 
   EntityBrowser browser;
 
@@ -30,51 +31,32 @@ public class ContentProducer implements mir.producer.Producer {
     EntityBrowser aBrowser,
     String aGeneratorIdentifier,
     String aResourceBundle,
-    String anOutputFilePrefix,
-    String anOutputFilePostfix) {
+    String anOutputFileExpression) {
 
     browser = aBrowser;
-    generatorIdentifier=aGeneratorIdentifier;
-    resourceBundle=aResourceBundle;
-    outputFilePrefix=anOutputFilePrefix;
-    outputFilePostfix=anOutputFilePostfix;
+    generatorIdentifier = aGeneratorIdentifier;
+    resourceBundle = aResourceBundle;
+    outputFileExpression = anOutputFileExpression;
   }
 
   public void produce( PrintWriter aLogger ) throws ProducerException {
     EntityContent content;
 
-    Map configMap = new HashMap();
     Map generationValues = new HashMap();
     Map dataMap = new HashMap();
     String fileName;
 
-
-
-               configMap.put("producerDocRoot", MirGlobal.getConfigProperty("Producer.DocRoot"));
-               configMap.put("storageRoot", MirGlobal.getConfigProperty("Producer.StorageRoot"));
-    configMap.put("productionHost", MirGlobal.getConfigProperty("Producer.ProductionHost"));
-               configMap.put("openAction", MirGlobal.getConfigProperty("Producer.OpenAction"));
-               configMap.put("docRoot", MirGlobal.getConfigProperty("RootUri"));
-               configMap.put("now", StringUtil.date2readableDateTime(new GregorianCalendar()));
-               configMap.put("videoHost", MirGlobal.getConfigProperty("Producer.Video.Host"));
-               configMap.put("audioHost", MirGlobal.getConfigProperty("Producer.Audio.Host"));
-               configMap.put("imageHost", MirGlobal.getConfigProperty("Producer.Image.Host"));
-               configMap.put("imagePath", MirGlobal.getConfigProperty("Producer.Image.Path"));
-               configMap.put("mirVersion", MirGlobal.getConfigProperty("Mir.Version"));
-               configMap.put("compressWhitespace", new freemarker.template.utility.CompressWhitespace() );
-    generationValues.put("config", configMap);
+    MirGlobal.localizer().producerTool().initializeGenerationValueSet(generationValues);
 
                MessageResources messages = MessageResources.getMessageResources(resourceBundle);
                generationValues.put("lang", new MessageMethodModel(null, messages) );
                generationValues.put("data", dataMap);
 
-
-
     try {
       Generator generator = MirGlobal.localizer().generators().makeGenerator(generatorIdentifier);
 
-      aLogger.println("ContentProducer.produce:<br>");
-      aLogger.println("generatorIdentifier = " + generatorIdentifier + "<br>");
+      aLogger.println("ContentProducer.produce:");
+      aLogger.println("generatorIdentifier = " + generatorIdentifier);
 
       while (browser.hasNext()) {
         content = (EntityContent) browser.next();
@@ -82,11 +64,16 @@ public class ContentProducer implements mir.producer.Producer {
 
         String date = content.getValue("date");
 
-        fileName = outputFilePrefix + "/" +
-                date.substring(0,4) + "/" + date.substring(4,6) + "/" +
-                content.getValue("id") + outputFilePostfix;
+      // ML: this will be done more elegantly soon!
+        dataMap.put("contentmonth", date.substring(4,6));
+        dataMap.put("contentyear", date.substring(0,4));
+        dataMap.put("contentid", content.getValue("id"));
+
+        aLogger.println("unparsed fileName = " + outputFileExpression);
+
+        fileName = ParameterExpander.expandExpression(dataMap, outputFileExpression);
 
-        aLogger.println("fileName = " + fileName + "<br>");
+        aLogger.println("fileName = " + fileName);
 
         try {
           File file = new File(fileName);
@@ -99,31 +86,31 @@ public class ContentProducer implements mir.producer.Producer {
           FileWriter fileWriter = new FileWriter(file);
           PrintWriter printWriter = new PrintWriter(fileWriter);
 
-          aLogger.println("generating: " + fileName + "<br/>");
+          aLogger.println("generating: " + fileName);
 
           generator.generate(printWriter, generationValues, aLogger);
           printWriter.close();
           fileWriter.close();
           content.setProduced(true);
 
-          aLogger.println("done generating: " + fileName + "<br/>");
+          aLogger.println("done generating: " + fileName);
         }
         catch (Exception e) {
-          aLogger.println("exception while generating " + fileName + ":<br/>");
-          aLogger.println(e.getMessage() + "<br/>");
+          aLogger.println("exception while generating " + fileName + ":");
+          aLogger.println(e.getMessage());
           e.printStackTrace(aLogger);
           aLogger.flush();
         }
       }
     }
     catch (Exception e) {
-      aLogger.println("exception while generating:<br/>");
-      aLogger.println(e.getMessage() + "<br/>");
+      aLogger.println("exception while generating:");
+      aLogger.println(e.getMessage());
       e.printStackTrace(aLogger);
       aLogger.flush();
     }
 
-    aLogger.println("ContentProducer.produce: done<br>");
+    aLogger.println("ContentProducer.produce: done");
 
   }
 
index 048b2d6..94b437f 100755 (executable)
@@ -8,22 +8,18 @@ import mircoders.storage.*;
 public class ContentProducerFactory implements ProducerFactory {
   private String generatorIdentifier;
   private String resourceBundle;
-  private String outputFilePrefix;
-  private String outputFilePostfix;
+  private String outputFileNameExpression;
   private int batchSize;
 
-// ML: extra selection needed for article types
   public ContentProducerFactory(
     String aGeneratorIdentifier,
     String aResourceBundle,
-    String anOutputFilePrefix,
-    String anOutputFilePostfix,
+    String anOutputFileNameExpression,
     int aBatchSize) {
 
-    generatorIdentifier=aGeneratorIdentifier;
-    resourceBundle=aResourceBundle;
-    outputFilePrefix=anOutputFilePrefix;
-    outputFilePostfix=anOutputFilePostfix;
+    generatorIdentifier = aGeneratorIdentifier;
+    resourceBundle = aResourceBundle;
+    outputFileNameExpression = anOutputFileNameExpression;
     batchSize=aBatchSize;
   }
 
@@ -45,8 +41,7 @@ public class ContentProducerFactory implements ProducerFactory {
           batchSize),
         generatorIdentifier,
         resourceBundle,
-        outputFilePrefix,
-        outputFilePostfix
+        outputFileNameExpression
       );
     } catch (Exception e) {
       throw new ProducerException(e);
diff --git a/source/mircoders/producer/NullProducer.java b/source/mircoders/producer/NullProducer.java
new file mode 100755 (executable)
index 0000000..7ebb768
--- /dev/null
@@ -0,0 +1,15 @@
+package mircoders.producer;
+
+import java.io.*;
+import mir.producer.*;
+
+public class NullProducer implements mir.producer.Producer {
+  public NullProducer() {
+  }
+
+  public void produce( PrintWriter aLogger ) throws ProducerException {
+  }
+}
+
+
+
diff --git a/source/mircoders/producer/NullProducerFactory.java b/source/mircoders/producer/NullProducerFactory.java
new file mode 100755 (executable)
index 0000000..60240e9
--- /dev/null
@@ -0,0 +1,26 @@
+package mircoders.producer;
+
+import java.io.*;
+import java.util.*;
+import mir.producer.*;
+
+public class NullProducerFactory implements ProducerFactory {
+  List verbs;
+
+  public NullProducerFactory() {
+    verbs = new Vector();
+  }
+
+  public void addVerb(String aVerb) {
+    verbs.add(aVerb);
+  }
+
+  public mir.producer.Producer makeProducer(String aVerb) {
+    return new NullProducer();
+  }
+
+
+  public Iterator verbs() {
+    return verbs.iterator();
+  }
+}
index dc598a4..e17087a 100755 (executable)
@@ -16,15 +16,15 @@ public class ScriptCallProducer implements mir.producer.Producer {
     Process process;
     int returnValue;
 
-    aLogger.println("Executing " + script + ":<br>");
+    aLogger.println("Executing " + script + ":");
 
     try {
       process = Runtime.getRuntime().exec(script);
       returnValue = process.waitFor();
-      aLogger.println("Terminated successfully, return value = " + returnValue + ".<br>");
+      aLogger.println("Terminated successfully, return value = " + returnValue + ".");
     }
     catch (Throwable e) {
-      aLogger.println("Exception has occurred: " + e.getMessage() + ":<br>");
+      aLogger.println("Exception has occurred: " + e.getMessage() + ":");
       e.printStackTrace(aLogger);
       throw new ProducerException(e);
     }
index 8371b00..e08595d 100755 (executable)
@@ -82,22 +82,22 @@ public class StartPageProducer implements mir.producer.Producer {
 
       Generator generator = MirGlobal.localizer().generators().makeGenerator(generatorIdentifier);
 
-      aLogger.println("StartPageProducer.produce:<br>");
-      aLogger.println("generatorIdentifier = " + generatorIdentifier + "<br>");
+      aLogger.println("StartPageProducer.produce:");
+      aLogger.println("generatorIdentifier = " + generatorIdentifier);
 
       File file = new File(outputFile);
       FileWriter fileWriter = new FileWriter(file);
       PrintWriter printWriter = new PrintWriter(fileWriter);
 
-      aLogger.println("generating: " + outputFile + "<br/>");
+      aLogger.println("generating: " + outputFile);
       generator.generate(printWriter, generationValues, aLogger);
       printWriter.close();
       fileWriter.close();
-      aLogger.println("done<br/>");
+      aLogger.println("done");
     }
     catch (Exception e) {
-      aLogger.println("exception while generating " + outputFile + ":<br/>");
-      aLogger.println(e.getMessage() + "<br/>");
+      aLogger.println("exception while generating " + outputFile + ":");
+      aLogger.println(e.getMessage());
       e.printStackTrace(aLogger);
       aLogger.flush();
     }
diff --git a/source/mircoders/producer/TopicStartPageProducerFactory.java b/source/mircoders/producer/TopicStartPageProducerFactory.java
new file mode 100755 (executable)
index 0000000..af9e4eb
--- /dev/null
@@ -0,0 +1,93 @@
+package mircoders.producer;
+
+import java.util.*;
+import mir.entity.*;
+import mir.producer.*;
+import mir.util.*;
+import mircoders.storage.*;
+import mircoders.module.*;
+import mircoders.entity.*;
+
+
+public class TopicStartPageProducerFactory implements ProducerFactory {
+  private String generatorIdentifier;
+  private String resourceBundle;
+  private String outputFileNameExpression;
+  private int nrNewswireItems;
+  private int nrFeatures;
+
+  public TopicStartPageProducerFactory(
+    String aGeneratorIdentifier,
+    String aResourceBundle,
+    String anOutputFileNameExpression,
+    int aNrFeatures,
+    int aNrNewswireItems) {
+
+    generatorIdentifier = aGeneratorIdentifier;
+    resourceBundle = aResourceBundle;
+    outputFileNameExpression = anOutputFileNameExpression;
+    nrFeatures = aNrFeatures;
+    nrNewswireItems = aNrNewswireItems;
+  }
+
+
+  public mir.producer.Producer makeProducer(String aVerb) throws ProducerException {
+    CompositeProducer result = new CompositeProducer();
+    Map values = new HashMap();
+
+    try {
+      ModuleContent contentModule = new ModuleContent(DatabaseContent.getInstance());
+      ModuleTopics topicsModule = new ModuleTopics(DatabaseTopics.getInstance());
+      ModuleBreaking breakingModule = new ModuleBreaking(DatabaseBreaking.getInstance());
+
+      EntityBrowser topicBrowser = new EntityBrowser(
+          DatabaseTopics.getInstance(),
+          "",
+          "",
+          100);
+
+      while (topicBrowser.hasNext()) {
+        Entity topic = (Entity) topicBrowser.next();
+        values.put("title", topic.getValue("title"));
+        values.put("filename", topic.getValue("filename"));
+        values.put("main_url", topic.getValue("main_url"));
+        values.put("archiv_url", topic.getValue("archiv_url"));
+
+
+        // ML: ok, this is way to low-level for this place:
+        String orderBy = "webdb_create desc";
+        String topicSelection = "exists (select * from content_x_topic where content_id=content.id and topic_id='"+topic.getValue("id")+"')";
+        String featureWhereClause = "is_published='1' and to_article_type='2' and "+topicSelection;
+        String newsWireWhereClause = "is_published='1' and to_article_type='1' and "+topicSelection;
+
+        result.addProducer(
+
+            //  "exists (select * from content_x_topic where content_id=content.id and topic_id="+topic.getValue("id")
+            new StartPageProducer(
+                    generatorIdentifier,
+                    resourceBundle,
+                    ParameterExpander.expandExpression(values, outputFileNameExpression),
+                    contentModule.getContent(newsWireWhereClause, orderBy, 0,nrNewswireItems),
+                    contentModule.getContent(featureWhereClause, orderBy, 0,nrFeatures),
+                    topicsModule .getTopicsList(),
+                    breakingModule.getBreakingNews()));
+      }
+
+      return result;
+
+
+    }
+    catch (Throwable e) {
+      throw new ProducerException(e);
+    }
+  };
+
+  public Iterator verbs() {
+    Vector verbList = new Vector();
+
+    verbList.add("all");
+
+    return verbList.iterator();
+  };
+}
+