Modified: 
manifoldcf/branches/dev_1x/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
 Fri Sep 19 15:10:39 2014
@@ -51,12 +51,14 @@ import org.apache.manifoldcf.core.interf
 import org.apache.manifoldcf.core.interfaces.IPasswordMapperActivity;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
+import org.apache.manifoldcf.core.interfaces.Specification;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 import org.apache.manifoldcf.core.interfaces.IKeystoreManager;
 import org.apache.manifoldcf.core.interfaces.KeystoreManagerFactory;
 import org.apache.manifoldcf.core.interfaces.Configuration;
 import org.apache.manifoldcf.core.interfaces.ConfigurationNode;
 import org.apache.manifoldcf.core.interfaces.LockManagerFactory;
+import org.apache.manifoldcf.crawler.interfaces.ISeedingActivity;
 import org.apache.manifoldcf.crawler.interfaces.IDocumentIdentifierStream;
 import org.apache.manifoldcf.crawler.interfaces.IProcessActivity;
 import org.apache.manifoldcf.crawler.interfaces.IExistingVersions;
@@ -431,24 +433,69 @@ public class SharedDriveConnector extend
   }
   
   
-  /** Given a document specification, get either a list of starting document 
identifiers (seeds),
-  * or a list of changes (deltas), depending on whether this is a "crawled" 
connector or not.
-  * These document identifiers will be loaded into the job's queue at the 
beginning of the
-  * job's execution.
-  * This method can return changes only (because it is provided a time range). 
 For full
-  * recrawls, the start time is always zero.
-  * Note that it is always ok to return MORE documents rather than less with 
this method.
+  /** Queue "seed" documents.  Seed documents are the starting places for 
crawling activity.  Documents
+  * are seeded when this method calls appropriate methods in the passed in 
ISeedingActivity object.
+  *
+  * This method can choose to find repository changes that happen only during 
the specified time interval.
+  * The seeds recorded by this method will be viewed by the framework based on 
what the
+  * getConnectorModel() method returns.
+  *
+  * It is not a big problem if the connector chooses to create more seeds than 
are
+  * strictly necessary; it is merely a question of overall work required.
+  *
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
+  * be called once, when the job starts, and at various periodic intervals as 
the job executes.
+  *
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
+  * getConnectorModel().
+  *
+  * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
+  *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
-  *@return the stream of local document identifiers that should be added to 
the queue.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public IDocumentIdentifierStream 
getDocumentIdentifiers(DocumentSpecification spec, long startTime, long endTime)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     getSession();
-    return new IdentifierStream(spec);
+    try
+    {
+      for (int i = 0; i < spec.getChildCount(); i++)
+      {
+        SpecificationNode n = spec.getChild(i);
+        if (n.getType().equals(NODE_STARTPOINT))
+        {
+          // The id returned MUST be in canonical form!!!
+          String seed = mapToIdentifier(n.getAttributeValue(ATTRIBUTE_PATH));
+          if (Logging.connectors.isDebugEnabled())
+          {
+            Logging.connectors.debug("Seed = '"+seed+"'");
+          }
+          activities.addSeedDocument(seed);
+        }
+      }
+    }
+    catch (java.net.SocketTimeoutException e)
+    {
+      throw new ManifoldCFException("Couldn't map to canonical path: 
"+e.getMessage(),e);
+    }
+    catch (InterruptedIOException e)
+    {
+      throw new ManifoldCFException("Interrupted: 
"+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
+    }
+    catch (IOException e)
+    {
+      throw new ManifoldCFException("Could not get a canonical path: 
"+e.getMessage(),e);
+    }
+    return "";
   }
 
   /** Process a set of documents.
@@ -2408,85 +2455,6 @@ public class SharedDriveConnector extend
     return e1m.equals(e2m);
   }
 
-  /** Document identifier stream.
-  */
-  protected class IdentifierStream implements IDocumentIdentifierStream
-  {
-    protected String[] ids = null;
-    protected int currentIndex = 0;
-
-    public IdentifierStream(DocumentSpecification spec)
-      throws ManifoldCFException
-    {
-      try
-      {
-        // Walk the specification for the "startpoint" types.  Amalgamate 
these into a list of strings.
-        // Presume that all roots are startpoint nodes
-        int i = 0;
-        int j = 0;
-        while (i < spec.getChildCount())
-        {
-          SpecificationNode n = spec.getChild(i);
-          if (n.getType().equals(NODE_STARTPOINT))
-            j++;
-          i++;
-        }
-        ids = new String[j];
-        i = 0;
-        j = 0;
-        while (i < ids.length)
-        {
-          SpecificationNode n = spec.getChild(i);
-          if (n.getType().equals(NODE_STARTPOINT))
-          {
-            // The id returned MUST be in canonical form!!!
-            ids[j] = mapToIdentifier(n.getAttributeValue(ATTRIBUTE_PATH));
-
-            if (Logging.connectors.isDebugEnabled())
-            {
-              Logging.connectors.debug("Seed = '"+ids[j]+"'");
-            }
-            j++;
-          }
-          i++;
-        }
-      }
-      catch (java.net.SocketTimeoutException e)
-      {
-        throw new ManifoldCFException("Couldn't map to canonical path: 
"+e.getMessage(),e);
-      }
-      catch (InterruptedIOException e)
-      {
-        throw new ManifoldCFException("Interrupted: 
"+e.getMessage(),e,ManifoldCFException.INTERRUPTED);
-      }
-      catch (IOException e)
-
-      {
-        throw new ManifoldCFException("Could not get a canonical path: 
"+e.getMessage(),e);
-      }
-    }
-
-    /** Get the next identifier.
-    *@return the next document identifier, or null if there are no more.
-    */
-    public String getNextIdentifier()
-      throws ManifoldCFException, ServiceInterruption
-    {
-      if (currentIndex == ids.length)
-        return null;
-      return ids[currentIndex++];
-    }
-
-    /** Close the stream.
-    */
-    public void close()
-      throws ManifoldCFException
-    {
-      ids = null;
-    }
-
-  }
-
   // UI support methods.
   //
   // These support methods come in two varieties.  The first bunch is involved 
in setting up connection configuration information.  The second bunch

Modified: 
manifoldcf/branches/dev_1x/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
 Fri Sep 19 15:10:39 2014
@@ -181,27 +181,37 @@ public class JDBCConnector extends org.a
   * It is not a big problem if the connector chooses to create more seeds than 
are
   * strictly necessary; it is merely a question of overall work required.
   *
-  * The times passed to this method may be interpreted for greatest 
efficiency.  The time ranges
-  * any given job uses with this connector will not overlap, but will proceed 
starting at 0 and going
-  * to the "current time", each time the job is run.  For continuous crawling 
jobs, this method will
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
   * be called once, when the job starts, and at various periodic intervals as 
the job executes.
   *
-  * When a job's specification is changed, the framework automatically resets 
the seeding start time to 0.  The
-  * seeding start time may also be set to 0 on each job run, depending on the 
connector model returned by
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
   * getConnectorModel().
   *
   * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
   *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
   *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime, int jobMode)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
+    long startTime;
+    if (lastSeedVersion == null)
+      startTime = 0L;
+    else
+    {
+      // Unpack seed time from seed version string
+      startTime = new Long(lastSeedVersion).longValue();
+    }
+
     getSession();
 
     // Set up the query
@@ -210,7 +220,7 @@ public class JDBCConnector extends org.a
     VariableMap vm = new VariableMap();
     
addConstant(vm,JDBCConstants.idReturnVariable,JDBCConstants.idReturnColumnName);
     addVariable(vm,JDBCConstants.startTimeVariable,startTime);
-    addVariable(vm,JDBCConstants.endTimeVariable,endTime);
+    addVariable(vm,JDBCConstants.endTimeVariable,seedTime);
 
     // Do the substitution
     ArrayList paramList = new ArrayList();
@@ -271,6 +281,7 @@ public class JDBCConnector extends org.a
     {
       idSet.close();
     }
+    return new Long(seedTime).toString();
   }
 
   /** Process a set of documents.

Modified: 
manifoldcf/branches/dev_1x/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
 Fri Sep 19 15:10:39 2014
@@ -39,6 +39,7 @@ import org.apache.manifoldcf.crawler.sys
 import org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector;
 import org.apache.manifoldcf.agents.interfaces.ServiceInterruption;
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
+import org.apache.manifoldcf.core.interfaces.Specification;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 import org.apache.commons.lang.StringUtils;
 import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
@@ -843,48 +844,37 @@ public class JiraRepositoryConnector ext
     
Messages.outputResourceWithVelocity(out,locale,EDIT_SPEC_HEADER_FORWARD,paramMap);
   }
 
-  /**
-   * Queue "seed" documents. Seed documents are the starting places for
-   * crawling activity. Documents are seeded when this method calls
-   * appropriate methods in the passed in ISeedingActivity object.
-   *
-   * This method can choose to find repository changes that happen only during
-   * the specified time interval. The seeds recorded by this method will be
-   * viewed by the framework based on what the getConnectorModel() method
-   * returns.
-   *
-   * It is not a big problem if the connector chooses to create more seeds
-   * than are strictly necessary; it is merely a question of overall work
-   * required.
-   *
-   * The times passed to this method may be interpreted for greatest
-   * efficiency. The time ranges any given job uses with this connector will
-   * not overlap, but will proceed starting at 0 and going to the "current
-   * time", each time the job is run. For continuous crawling jobs, this
-   * method will be called once, when the job starts, and at various periodic
-   * intervals as the job executes.
-   *
-   * When a job's specification is changed, the framework automatically resets
-   * the seeding start time to 0. The seeding start time may also be set to 0
-   * on each job run, depending on the connector model returned by
-   * getConnectorModel().
-   *
-   * Note that it is always ok to send MORE documents rather than less to this
-   * method.
-   *
-   * @param activities is the interface this method should use to perform
-   * whatever framework actions are desired.
-   * @param spec is a document specification (that comes from the job).
-   * @param startTime is the beginning of the time range to consider,
-   * inclusive.
-   * @param endTime is the end of the time range to consider, exclusive.
-   * @param jobMode is an integer describing how the job is being run, whether
-   * continuous or once-only.
-   */
+  /** Queue "seed" documents.  Seed documents are the starting places for 
crawling activity.  Documents
+  * are seeded when this method calls appropriate methods in the passed in 
ISeedingActivity object.
+  *
+  * This method can choose to find repository changes that happen only during 
the specified time interval.
+  * The seeds recorded by this method will be viewed by the framework based on 
what the
+  * getConnectorModel() method returns.
+  *
+  * It is not a big problem if the connector chooses to create more seeds than 
are
+  * strictly necessary; it is merely a question of overall work required.
+  *
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
+  * be called once, when the job starts, and at various periodic intervals as 
the job executes.
+  *
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
+  * getConnectorModel().
+  *
+  * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
+  *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
+  *@param spec is a document specification (that comes from the job).
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
+  */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities,
-      DocumentSpecification spec, long startTime, long endTime, int jobMode)
-      throws ManifoldCFException, ServiceInterruption {
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
+    throws ManifoldCFException, ServiceInterruption {
 
     String jiraDriveQuery = JiraConfig.JIRA_QUERY_DEFAULT;
     int i = 0;
@@ -937,6 +927,7 @@ public class JiraRepositoryConnector ext
     } catch (ResponseException e) {
       handleResponseException(e);
     }
+    return "";
   }
   
 

Modified: 
manifoldcf/branches/dev_1x/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
 Fri Sep 19 15:10:39 2014
@@ -940,14 +940,34 @@ public class LivelinkConnector extends o
   
   /** Queue "seed" documents.  Seed documents are the starting places for 
crawling activity.  Documents
   * are seeded when this method calls appropriate methods in the passed in 
ISeedingActivity object.
+  *
+  * This method can choose to find repository changes that happen only during 
the specified time interval.
+  * The seeds recorded by this method will be viewed by the framework based on 
what the
+  * getConnectorModel() method returns.
+  *
+  * It is not a big problem if the connector chooses to create more seeds than 
are
+  * strictly necessary; it is merely a question of overall work required.
+  *
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
+  * be called once, when the job starts, and at various periodic intervals as 
the job executes.
+  *
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
+  * getConnectorModel().
+  *
+  * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
   *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     getSession();
@@ -1058,7 +1078,7 @@ public class LivelinkConnector extends o
       }
       
     }
-
+    return "";
   }
 
   /** Process a set of documents.

Modified: 
manifoldcf/branches/dev_1x/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java
 Fri Sep 19 15:10:39 2014
@@ -70,6 +70,8 @@ public class MeridioConnector extends or
   protected String urlBase = null;
   protected String urlVersionBase = null;
 
+  private final static int maxHitsToReturn      = 100;
+
   /** Deny access token for Meridio */
   private final static String defaultAuthorityDenyToken = GLOBAL_DENY_TOKEN;
 
@@ -563,39 +565,130 @@ public class MeridioConnector extends or
     return true;
   }
 
-  /** Given a document specification, get either a list of starting document 
identifiers (seeds),
-  * or a list of changes (deltas), depending on whether this is a "crawled" 
connector or not.
-  * These document identifiers will be loaded into the job's queue at the 
beginning of the
-  * job's execution.
-  * This method can return changes only (because it is provided a time range). 
 For full
-  * recrawls, the start time is always zero.
-  * Note that it is always ok to return MORE documents rather than less with 
this method.
+  /** Queue "seed" documents.  Seed documents are the starting places for 
crawling activity.  Documents
+  * are seeded when this method calls appropriate methods in the passed in 
ISeedingActivity object.
+  *
+  * This method can choose to find repository changes that happen only during 
the specified time interval.
+  * The seeds recorded by this method will be viewed by the framework based on 
what the
+  * getConnectorModel() method returns.
+  *
+  * It is not a big problem if the connector chooses to create more seeds than 
are
+  * strictly necessary; it is merely a question of overall work required.
+  *
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
+  * be called once, when the job starts, and at various periodic intervals as 
the job executes.
+  *
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
+  * getConnectorModel().
+  *
+  * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
+  *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
-  *@return the stream of local document identifiers that should be added to 
the queue.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public IDocumentIdentifierStream 
getDocumentIdentifiers(DocumentSpecification spec, long startTime, long endTime)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
-    Logging.connectors.debug("Meridio: Entering 'getDocumentIdentifiers' 
method");
-
-    try
+    Logging.connectors.debug("Meridio: Entering 'addSeedDocuments' method");
+    long startTime;
+    if (lastSeedVersion == null)
+      startTime = 0L;
+    else
     {
-      // Adjust start time so that we don't miss documents that squeeze in 
with earlier timestamps after we've already scanned that interval.
-      // Chose an interval of 15 minutes, but I've never seen this effect take 
place over a time interval even 1/10 of that.
-      long timeAdjust = 15L * 60000L;
-      if (startTime > timeAdjust)
-        startTime -= timeAdjust;
-      else
-        startTime = 0L;
-      return new IdentifierStream(spec, startTime, endTime);
+      // Unpack seed time from seed version string
+      startTime = new Long(lastSeedVersion).longValue();
     }
-    finally
+    // Adjust start time so that we don't miss documents that squeeze in with 
earlier timestamps after we've already scanned that interval.
+    // Chose an interval of 15 minutes, but I've never seen this effect take 
place over a time interval even 1/10 of that.
+    long timeAdjust = 15L * 60000L;
+    if (startTime > timeAdjust)
+      startTime -= timeAdjust;
+    else
+      startTime = 0L;
+
+    while (true)
     {
-      Logging.connectors.debug("Meridio: Exiting 'getDocumentIdentifiers' 
method");
+      getSession();
+
+      try
+      {
+        DMSearchResults searchResults;
+        int numResultsReturnedByStream = 0;
+
+        while (true)
+        {
+          searchResults = documentSpecificationSearch(spec,
+            startTime, seedTime, numResultsReturnedByStream + 1, 
maxHitsToReturn);
+
+          for (int i = 0; i < searchResults.returnedHitsCount; i++)
+          {
+            long documentId =
+              searchResults.dsDM.getSEARCHRESULTS_DOCUMENTS()[i].getDocId();
+
+            String strDocumentId = new Long(documentId).toString();
+            activities.addSeedDocument(strDocumentId);
+          }
+          
+          numResultsReturnedByStream += searchResults.returnedHitsCount;
+          if (numResultsReturnedByStream == searchResults.totalHitsCount)
+            break;
+        }
+        return new Long(seedTime).toString();
+      }
+      catch (org.apache.axis.AxisFault e)
+      {
+        long currentTime = System.currentTimeMillis();
+        if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
+        {
+          org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
+          if (elem != null)
+          {
+            elem.normalize();
+            String httpErrorCode = elem.getFirstChild().getNodeValue().trim();
+            throw new ManifoldCFException("Unexpected http error code 
"+httpErrorCode+" accessing Meridio: "+e.getMessage(),e);
+          }
+          throw new ManifoldCFException("Unknown http error occurred while 
performing search: "+e.getMessage(),e);
+        }
+        if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException";)))
+        {
+          String exceptionName = e.getFaultString();
+          if (exceptionName.equals("java.lang.InterruptedException"))
+            throw new 
ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
+        }
+        if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server";)))
+        {
+          if (e.getFaultString().indexOf(" 23031#") != -1)
+          {
+            // This means that the session has expired, so reset it and retry
+            meridio_ = null;
+            continue;
+          }
+        }
+        if (Logging.connectors.isDebugEnabled())
+          Logging.connectors.debug("Meridio: Got an unknown remote exception 
while performing search - axis fault = "+e.getFaultCode().getLocalPart()+", 
detail = "+e.getFaultString()+" - retrying",e);
+        throw new ServiceInterruption("Remote procedure exception: 
"+e.getMessage(),  e, currentTime + 300000L,
+          currentTime + 3 * 60 * 60000L,-1,false);
+      }
+      catch (RemoteException remoteException)
+      {
+        throw new ManifoldCFException("Meridio: A Remote Exception occurred 
while " +
+          "performing a search: "+remoteException.getMessage(), 
remoteException);
+      }
+      catch (MeridioDataSetException meridioDataSetException)
+      {
+        throw new ManifoldCFException("Meridio: A problem occurred 
manipulating the Web " +
+          "Service XML: "+meridioDataSetException.getMessage(), 
meridioDataSetException);
+      }
     }
+
   }
 
 
@@ -4169,208 +4262,6 @@ public class MeridioConnector extends or
   }
 
 
-  private final static int maxHitsToReturn      = 100;
-
-  /** Document identifier stream.
-  */
-  protected class IdentifierStream implements IDocumentIdentifierStream
-  {
-    protected DMSearchResults searchResults  = null;
-    protected int currentResult              = 0;
-    protected int numResultsReturnedByStream = 0;
-
-    DocumentSpecification spec_              = null;
-    long startTime_                          = 0L;
-    long endTime_                            = 0L;
-
-
-    public IdentifierStream
-    (
-      DocumentSpecification spec,
-      long startTime,
-      long endTime
-    )
-      throws ManifoldCFException,ServiceInterruption
-    {
-      Logging.connectors.debug("Meridio: Entering 'IdentifierStream' 
constructor");
-      while (true)
-      {
-        getSession();
-
-        try
-        {
-          spec_             = spec;
-          startTime_        = startTime;
-          endTime_          = endTime;
-
-          searchResults = documentSpecificationSearch(spec,
-            startTime, endTime,     1, maxHitsToReturn);
-
-          Logging.connectors.debug("Meridio: Exiting 'IdentifierStream' 
constructor");
-
-          return;
-        }
-        catch (org.apache.axis.AxisFault e)
-        {
-          long currentTime = System.currentTimeMillis();
-          if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
-          {
-            org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
-            if (elem != null)
-            {
-              elem.normalize();
-              String httpErrorCode = 
elem.getFirstChild().getNodeValue().trim();
-              throw new ManifoldCFException("Unexpected http error code 
"+httpErrorCode+" accessing Meridio: "+e.getMessage(),e);
-            }
-            throw new ManifoldCFException("Unknown http error occurred while 
performing search: "+e.getMessage(),e);
-          }
-          if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException";)))
-          {
-            String exceptionName = e.getFaultString();
-            if (exceptionName.equals("java.lang.InterruptedException"))
-              throw new 
ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
-          }
-          if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server";)))
-          {
-            if (e.getFaultString().indexOf(" 23031#") != -1)
-            {
-              // This means that the session has expired, so reset it and retry
-              meridio_ = null;
-              continue;
-            }
-          }
-          if (Logging.connectors.isDebugEnabled())
-            Logging.connectors.debug("Meridio: Got an unknown remote exception 
while performing search - axis fault = "+e.getFaultCode().getLocalPart()+", 
detail = "+e.getFaultString()+" - retrying",e);
-          throw new ServiceInterruption("Remote procedure exception: 
"+e.getMessage(),  e, currentTime + 300000L,
-            currentTime + 3 * 60 * 60000L,-1,false);
-        }
-        catch (RemoteException remoteException)
-        {
-          throw new ManifoldCFException("Meridio: A Remote Exception occurred 
while " +
-            "performing a search: "+remoteException.getMessage(), 
remoteException);
-        }
-        catch (MeridioDataSetException meridioDataSetException)
-        {
-          throw new ManifoldCFException("Meridio: A problem occurred 
manipulating the Web " +
-            "Service XML: "+meridioDataSetException.getMessage(), 
meridioDataSetException);
-        }
-      }
-    }
-
-
-
-    /** Get the next identifier.
-    *@return the next document identifier, or null if there are no more.
-    */
-    public String getNextIdentifier()
-      throws ManifoldCFException, ServiceInterruption
-    {
-      Logging.connectors.debug("Meridio: Entering 'getNextIdentifier' method");
-
-      try
-      {
-        if (null                       == searchResults ||
-          numResultsReturnedByStream == searchResults.totalHitsCount)
-        {
-          return null;
-        }
-
-        if (currentResult == searchResults.returnedHitsCount)
-        {
-          while (true)
-          {
-            getSession();
-            try
-            {
-              searchResults = documentSpecificationSearch(spec_,
-                startTime_, endTime_, numResultsReturnedByStream + 1,
-                maxHitsToReturn);
-
-              currentResult = 0;
-              break;
-            }
-            catch (org.apache.axis.AxisFault e)
-            {
-              long currentTime = System.currentTimeMillis();
-              if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
-              {
-                org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
-                if (elem != null)
-                {
-                  elem.normalize();
-                  String httpErrorCode = 
elem.getFirstChild().getNodeValue().trim();
-                  throw new ManifoldCFException("Unexpected http error code 
"+httpErrorCode+" performing search: "+e.getMessage());
-                }
-                throw new ManifoldCFException("Unknown http error occurred 
while performing search: "+e.getMessage(),e);
-              }
-              if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server.userException";)))
-              {
-                String exceptionName = e.getFaultString();
-                if (exceptionName.equals("java.lang.InterruptedException"))
-                  throw new 
ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
-              }
-              if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/","Server";)))
-              {
-                if (e.getFaultString().indexOf(" 23031#") != -1)
-                {
-                  // This means that the session has expired, so reset it and 
retry
-                  meridio_ = null;
-                  continue;
-                }
-              }
-
-              throw new ManifoldCFException("Meridio: Got an unknown remote 
exception performing search - axis fault = "+e.getFaultCode().getLocalPart()+", 
detail = "+e.getFaultString(),e);
-            }
-            catch (RemoteException remoteException)
-            {
-              throw new ServiceInterruption("Meridio: A Remote Exception 
occurred while " +
-                "performing a Meridio search: "+remoteException.getMessage(), 
remoteException,
-                System.currentTimeMillis() + interruptionRetryTime,
-                -1L, -1, true);
-            }
-            catch (MeridioDataSetException meridioDataSetException)
-            {
-              throw new ManifoldCFException("Meridio: A problem occurred 
manipulating the Web " +
-                "Service XML: "+meridioDataSetException.getMessage(), 
meridioDataSetException);
-            }
-          }
-        }
-
-        long documentId =
-          
searchResults.dsDM.getSEARCHRESULTS_DOCUMENTS()[currentResult].getDocId();
-
-        String strDocumentId = new Long(documentId).toString();
-
-        currentResult++;
-        numResultsReturnedByStream++;
-
-        return strDocumentId;
-      }
-      finally
-      {
-        Logging.connectors.debug("Meridio: Exiting 'getNextIdentifier' 
method");
-      }
-    }
-
-
-
-    /** Close the stream.
-    */
-    public void close()
-      throws ManifoldCFException
-    {
-      Logging.connectors.debug("Meridio: Entering 'IdentifierStream.close' 
method");
-
-      searchResults              = null;
-      currentResult              = 0;
-      numResultsReturnedByStream = 0;
-
-      Logging.connectors.debug("Meridio: Exiting 'IdentifierStream.close' 
method");
-    }
-  }
-
-
-
   /** Returns the categories set up in the Meridio system; these are used by 
the UI for two
   * purposes
   *

Modified: 
manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
 Fri Sep 19 15:10:39 2014
@@ -98,15 +98,8 @@ public class OpenSearchServerConnector e
   private HttpClient client = null;
   private long expirationTime = -1L;
 
-  // Private data
-
-  private String specsCacheOutpuDescription;
-  private OpenSearchServerSpecs specsCache;
-
   public OpenSearchServerConnector()
   {
-    specsCacheOutpuDescription = null;
-    specsCache = null;
   }
 
   @Override
@@ -397,27 +390,6 @@ public class OpenSearchServerConnector e
     return new OpenSearchServerSpecs(getSpecNode(os));
   }
 
-  final private OpenSearchServerSpecs getSpecsCache(String outputDescription)
-      throws ManifoldCFException
-  {
-    try
-    {
-      synchronized (this)
-      {
-        if (!outputDescription.equals(specsCacheOutpuDescription))
-          specsCache = null;
-        if (specsCache == null)
-          specsCache = new OpenSearchServerSpecs(new JSONObject(
-              outputDescription));
-        return specsCache;
-      }
-    }
-    catch (JSONException e)
-    {
-      throw new ManifoldCFException(e);
-    }
-  }
-
   @Override
   public VersionContext getPipelineDescription(Specification os)
       throws ManifoldCFException
@@ -430,7 +402,7 @@ public class OpenSearchServerConnector e
   public boolean checkLengthIndexable(VersionContext outputDescription, long 
length, IOutputCheckActivity activities)
       throws ManifoldCFException, ServiceInterruption
   {
-    OpenSearchServerSpecs specs = 
getSpecsCache(outputDescription.getVersionString());
+    OpenSearchServerSpecs specs = new 
OpenSearchServerSpecs(getSpecNode(outputDescription.getSpecification()));
     long maxFileSize = specs.getMaxFileSize();
     if (length > maxFileSize)
       return false;
@@ -441,7 +413,7 @@ public class OpenSearchServerConnector e
   public boolean checkMimeTypeIndexable(VersionContext outputDescription, 
String mimeType, IOutputCheckActivity activities)
       throws ManifoldCFException, ServiceInterruption
   {
-    OpenSearchServerSpecs specs = 
getSpecsCache(outputDescription.getVersionString());
+    OpenSearchServerSpecs specs = new 
OpenSearchServerSpecs(getSpecNode(outputDescription.getSpecification()));
     return specs.checkMimeType(mimeType);
   }
 
@@ -460,7 +432,7 @@ public class OpenSearchServerConnector e
   public boolean checkURLIndexable(VersionContext outputDescription, String 
url, IOutputCheckActivity activities)
       throws ManifoldCFException, ServiceInterruption
   {
-    OpenSearchServerSpecs specs = 
getSpecsCache(outputDescription.getVersionString());
+    OpenSearchServerSpecs specs = new 
OpenSearchServerSpecs(getSpecNode(outputDescription.getSpecification()));
     return specs.checkExtension(FilenameUtils.getExtension(url));
   }
 
@@ -502,12 +474,12 @@ public class OpenSearchServerConnector e
     return null;
   }
 
-  private static Map<String, Integer> ossInstances = null;
+  // Apparently, only one connection to any given Open Search Server instance 
is allowed at a time.
+  
+  private static Map<String, Integer> ossInstances = new TreeMap<String, 
Integer>();
 
-  private synchronized final Integer addInstance(OpenSearchServerConfig config)
+  private final Integer addInstance(OpenSearchServerConfig config)
   {
-    if (ossInstances == null)
-      ossInstances = new TreeMap<String, Integer>();
     synchronized (ossInstances)
     {
       String uii = config.getUniqueIndexIdentifier();
@@ -523,10 +495,8 @@ public class OpenSearchServerConnector e
     }
   }
 
-  private synchronized final void removeInstance(OpenSearchServerConfig config)
+  private final void removeInstance(OpenSearchServerConfig config)
   {
-    if (ossInstances == null)
-      return;
     synchronized (ossInstances)
     {
       String uii = config.getUniqueIndexIdentifier();

Modified: 
manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerSpecs.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerSpecs.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerSpecs.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerSpecs.java
 Fri Sep 19 15:10:39 2014
@@ -48,29 +48,6 @@ public class OpenSearchServerSpecs exten
   private Set<String> mimeTypeSet;
 
   /**
-   * Build a set of OpenSearchServer parameters by reading an JSON object
-   * 
-   * @param json
-   * @throws JSONException
-   * @throws ManifoldCFException
-   */
-  public OpenSearchServerSpecs(JSONObject json) throws JSONException,
-      ManifoldCFException {
-    super(SPECIFICATIONLIST);
-    extensionSet = null;
-    mimeTypeSet = null;
-    for (ParameterEnum param : SPECIFICATIONLIST) {
-      String value = null;
-      value = json.getString(param.name());
-      if (value == null)
-        value = param.defaultValue;
-      put(param, value);
-    }
-    extensionSet = createStringSet(getExtensions());
-    mimeTypeSet = createStringSet(getMimeTypes());
-  }
-
-  /**
    * Build a set of OpenSearchServer parameters by reading an instance of
    * SpecificationNode.
    * 

Propchange: manifoldcf/branches/dev_1x/connectors/rss/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk/connectors/rss:r1621613

Modified: 
manifoldcf/branches/dev_1x/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
 Fri Sep 19 15:10:39 2014
@@ -369,24 +369,26 @@ public class RSSConnector extends org.ap
   * It is not a big problem if the connector chooses to create more seeds than 
are
   * strictly necessary; it is merely a question of overall work required.
   *
-  * The times passed to this method may be interpreted for greatest 
efficiency.  The time ranges
-  * any given job uses with this connector will not overlap, but will proceed 
starting at 0 and going
-  * to the "current time", each time the job is run.  For continuous crawling 
jobs, this method will
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
   * be called once, when the job starts, and at various periodic intervals as 
the job executes.
   *
-  * When a job's specification is changed, the framework automatically resets 
the seeding start time to 0.  The
-  * seeding start time may also be set to 0 on each job run, depending on the 
connector model returned by
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
   * getConnectorModel().
   *
   * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
   *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     getSession();
@@ -400,6 +402,7 @@ public class RSSConnector extends org.ap
       String canonicalURL = (String)iter.next();
       activities.addSeedDocument(canonicalURL);
     }
+    return "";
   }
 
   /** Convert an absolute or relative URL to a document identifier.  This may 
involve several steps at some point,

Propchange: manifoldcf/branches/dev_1x/connectors/sharepoint/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk/connectors/sharepoint:r1621613

Modified: 
manifoldcf/branches/dev_1x/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
 Fri Sep 19 15:10:39 2014
@@ -650,31 +650,33 @@ public class SharePointRepository extend
   * It is not a big problem if the connector chooses to create more seeds than 
are
   * strictly necessary; it is merely a question of overall work required.
   *
-  * The times passed to this method may be interpreted for greatest 
efficiency.  The time ranges
-  * any given job uses with this connector will not overlap, but will proceed 
starting at 0 and going
-  * to the "current time", each time the job is run.  For continuous crawling 
jobs, this method will
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
   * be called once, when the job starts, and at various periodic intervals as 
the job executes.
   *
-  * When a job's specification is changed, the framework automatically resets 
the seeding start time to 0.  The
-  * seeding start time may also be set to 0 on each job run, depending on the 
connector model returned by
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
   * getConnectorModel().
   *
   * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
   *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
   *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime, int jobMode)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     // Check the session
     getSession();
     // Add just the root.
     activities.addSeedDocument("/");
+    return "";
   }
 
   protected static final String[] attachmentDataNames = new 
String[]{"createdDate","modifiedDate","accessTokens","denyTokens","url","guids"};

Modified: 
manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
 Fri Sep 19 15:10:39 2014
@@ -576,7 +576,7 @@ public class SolrConnector extends org.a
   public int addOrReplaceDocumentWithException(String documentURI, 
VersionContext pipelineDescription, RepositoryDocument document, String 
authorityNameString, IOutputAddActivity activities)
     throws ManifoldCFException, ServiceInterruption, IOException
   {
-    SpecPacker sp = new SpecPacker(pipelineDescription.getVersionString());
+    SpecPacker sp = new SpecPacker(pipelineDescription.getSpecification());
 
     // Establish a session
     getSession();
@@ -2679,59 +2679,6 @@ public class SolrConnector extends org.a
     
     }
     
-    /** Packed string parser.
-    * This method unpacks a packed version string, and makes the formerly 
packed data available for use.
-    * Note that it is actually *not* a requirement for this method to do the 
unpacking; that can happen "on demand"
-    * for performance, if deemed helpful.
-    */
-    public SpecPacker(String packedString) {
-      // Build the argument map we'll send.
-      int index = 0;
-      List<String> nameValues = new ArrayList<String>();
-      index = unpackList(nameValues,packedString,index,'+');
-      List<String> sts = new ArrayList<String>();
-      index = unpackList(sts,packedString,index,'+');
-      // extract keep all metadata Flag
-      boolean keepAllMetadata = true;
-      if (index < packedString.length())
-      {
-        keepAllMetadata = (packedString.charAt(index++) == '+');
-      }
-      this.keepAllMetadata = keepAllMetadata;
-      
-      
-      String[] fixedBuffer = new String[2];
-      
-      // Do the name/value pairs
-      for (String x : nameValues)
-      {
-        unpackFixedList(fixedBuffer,x,0,'=');
-        String attrName = fixedBuffer[0];
-        List<String> list = args.get(attrName);
-        if (list == null)
-        {
-          list = new ArrayList<String>();
-          args.put(attrName,list);
-        }
-        list.add(fixedBuffer[1]);
-      }
-      
-      // Do the source/target pairs
-      for (String x : sts)
-      {
-        unpackFixedList(fixedBuffer,x,0,'=');
-        String source = fixedBuffer[0];
-        String target = fixedBuffer[1];
-        List<String> list = sourceTargets.get(source);
-        if (list == null) {
-          list = new ArrayList<String>();
-          sourceTargets.put(source, list);
-        }
-        list.add(target);
-      }
-
-    }
-    
     public String toPackedString() {
       StringBuilder sb = new StringBuilder();
       String[] sortArray = new String[args.size()];

Modified: 
manifoldcf/branches/dev_1x/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
 Fri Sep 19 15:10:39 2014
@@ -493,24 +493,26 @@ public class WebcrawlerConnector extends
   * It is not a big problem if the connector chooses to create more seeds than 
are
   * strictly necessary; it is merely a question of overall work required.
   *
-  * The times passed to this method may be interpreted for greatest 
efficiency.  The time ranges
-  * any given job uses with this connector will not overlap, but will proceed 
starting at 0 and going
-  * to the "current time", each time the job is run.  For continuous crawling 
jobs, this method will
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
   * be called once, when the job starts, and at various periodic intervals as 
the job executes.
   *
-  * When a job's specification is changed, the framework automatically resets 
the seeding start time to 0.  The
-  * seeding start time may also be set to 0 on each job run, depending on the 
connector model returned by
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
   * getConnectorModel().
   *
   * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
   *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     getSession();
@@ -544,6 +546,7 @@ public class WebcrawlerConnector extends
       }
       
activities.addSeedDocument(documentIdentifier,calculateDocumentEvents(activities,documentIdentifier));
     }
+    return "";
   }
 
   // Session login states (so we can use the same fetch logic multiple times)

Propchange: manifoldcf/branches/dev_1x/connectors/wiki/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk/connectors/wiki:r1621613

Modified: 
manifoldcf/branches/dev_1x/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
 Fri Sep 19 15:10:39 2014
@@ -849,26 +849,37 @@ public class WikiConnector extends org.a
   * It is not a big problem if the connector chooses to create more seeds than 
are
   * strictly necessary; it is merely a question of overall work required.
   *
-  * The times passed to this method may be interpreted for greatest 
efficiency.  The time ranges
-  * any given job uses with this connector will not overlap, but will proceed 
starting at 0 and going
-  * to the "current time", each time the job is run.  For continuous crawling 
jobs, this method will
+  * The end time and seeding version string passed to this method may be 
interpreted for greatest efficiency.
+  * For continuous crawling jobs, this method will
   * be called once, when the job starts, and at various periodic intervals as 
the job executes.
   *
-  * When a job's specification is changed, the framework automatically resets 
the seeding start time to 0.  The
-  * seeding start time may also be set to 0 on each job run, depending on the 
connector model returned by
+  * When a job's specification is changed, the framework automatically resets 
the seeding version string to null.  The
+  * seeding version string may also be set to null on each job run, depending 
on the connector model returned by
   * getConnectorModel().
   *
   * Note that it is always ok to send MORE documents rather than less to this 
method.
+  * The connector will be connected before this method can be called.
   *@param activities is the interface this method should use to perform 
whatever framework actions are desired.
   *@param spec is a document specification (that comes from the job).
-  *@param startTime is the beginning of the time range to consider, inclusive.
-  *@param endTime is the end of the time range to consider, exclusive.
+  *@param seedTime is the end of the time range of documents to consider, 
exclusive.
+  *@param lastSeedVersionString is the last seeding version string for this 
job, or null if the job has no previous seeding version string.
+  *@param jobMode is an integer describing how the job is being run, whether 
continuous or once-only.
+  *@return an updated seeding version string, to be stored with the job.
   */
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
+    long startTime;
+    if (lastSeedVersion == null)
+      startTime = 0L;
+    else
+    {
+      // Unpack seed time from seed version string
+      startTime = new Long(lastSeedVersion).longValue();
+    }
+
     // Scan specification nodes and extract prefixes and namespaces
     boolean seenAny = false;
     for (int i = 0 ; i < spec.getChildCount() ; i++)
@@ -878,12 +889,14 @@ public class WikiConnector extends org.a
       {
         String namespace = sn.getAttributeValue(WikiConfig.ATTR_NAMESPACE);
         String titleprefix = sn.getAttributeValue(WikiConfig.ATTR_TITLEPREFIX);
-        listAllPages(activities,namespace,titleprefix,startTime,endTime);
+        listAllPages(activities,namespace,titleprefix,startTime,seedTime);
         seenAny = true;
       }
     }
     if (!seenAny)
-      listAllPages(activities,null,null,startTime,endTime);
+      listAllPages(activities,null,null,startTime,seedTime);
+    
+    return new Long(seedTime).toString();
   }
 
   /** Process a set of documents.

Modified: 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/InterruptionRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/InterruptionRepositoryConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/InterruptionRepositoryConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/InterruptionRepositoryConnector.java
 Fri Sep 19 15:10:39 2014
@@ -34,8 +34,8 @@ public class InterruptionRepositoryConne
   }
 
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime, int jobMode)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     String docCount = "10";
@@ -52,6 +52,7 @@ public class InterruptionRepositoryConne
       String doc = "test"+i+".txt";
       activities.addSeedDocument(doc,null);
     }
+    return "";
   }
   
   /** Process a set of documents.

Modified: 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/SchedulingRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/SchedulingRepositoryConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/SchedulingRepositoryConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/SchedulingRepositoryConnector.java
 Fri Sep 19 15:10:39 2014
@@ -44,8 +44,8 @@ public class SchedulingRepositoryConnect
   }
 
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime, int jobMode)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     // A seed per domain
@@ -58,6 +58,7 @@ public class SchedulingRepositoryConnect
       activities.addSeedDocument(Integer.toString(i)+"/",null);
     }
     System.out.println("Seeding completed at "+System.currentTimeMillis());
+    return "";
   }
   
   /** Process a set of documents.

Modified: 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/TestingRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/TestingRepositoryConnector.java?rev=1626245&r1=1626244&r2=1626245&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/TestingRepositoryConnector.java
 (original)
+++ 
manifoldcf/branches/dev_1x/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/TestingRepositoryConnector.java
 Fri Sep 19 15:10:39 2014
@@ -34,8 +34,8 @@ public class TestingRepositoryConnector 
   }
 
   @Override
-  public void addSeedDocuments(ISeedingActivity activities, 
DocumentSpecification spec,
-    long startTime, long endTime, int jobMode)
+  public String addSeedDocuments(ISeedingActivity activities, Specification 
spec,
+    String lastSeedVersion, long seedTime, int jobMode)
     throws ManifoldCFException, ServiceInterruption
   {
     String docCount = "3";
@@ -52,6 +52,7 @@ public class TestingRepositoryConnector 
       String doc = "test"+i+".txt";
       activities.addSeedDocument(doc,null);
     }
+    return "";
   }
   
   /** Process a set of documents.


Reply via email to