reversed the page numbers for batching producer nodes
[mir.git] / source / mir / producer / EntityBatchingProducerNode.java
index 9a865c0..a57a751 100755 (executable)
@@ -7,8 +7,6 @@ import mir.entity.*;
 import mir.storage.*;
 import mir.util.*;
 
-//     abstract public int getSize(String where) throws SQLException,StorageObjectException;
-
 public class EntityBatchingProducerNode implements ProducerNode {
   private Map verbs;
 
@@ -110,7 +108,7 @@ public class EntityBatchingProducerNode implements ProducerNode {
       batchLocations.add(new BatchLocation(nrBatchesAfterFirst*nrEntitiesPerBatch, nrEntitiesInFirstBatch));
       batchData = new HashMap();
       batchData.put("identifier", "");
-      batchData.put("index", Integer.toString(1));
+      batchData.put("index", Integer.toString(nrBatchesAfterFirst+1));
       batchData.put("size", Integer.toString(nrEntitiesInFirstBatch));
       batchesData.add(batchData);
 
@@ -118,7 +116,7 @@ public class EntityBatchingProducerNode implements ProducerNode {
         batchLocations.add(1, new BatchLocation(i*nrEntitiesPerBatch, nrEntitiesPerBatch));
         batchData = new HashMap();
         batchData.put("identifier", Integer.toString(i));
-        batchData.put("index", Integer.toString(nrBatchesAfterFirst-i+1));
+        batchData.put("index", Integer.toString(i+1));
         batchData.put("size", Integer.toString(nrEntitiesPerBatch));
         batchesData.add(1, batchData);
       }