Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.DocumentList.checkpoint()


    while (docList != null) {
      Document doc;
      while (null != (doc = docList.nextDocument())) {
        documents.add((NotesConnectorDocument) doc);
      }
      String checkpoint = docList.checkpoint();
      // Resume traversal.
      tm.setBatchHint(20);
      docList = tm.resumeTraversal(checkpoint);
    }
    return documents;
View Full Code Here


      String docId = doc.findProperty(SpiConstants.PROPNAME_DOCID)
          .nextValue().toString();
      assertNotNull("Missing doc id", docId);
      docIdList.add(docId);
    }
    checkpoint = docList.checkpoint();
    assertNotNull("Checkpoint was null", checkpoint);
    assertTrue("No docs found", docIdList.size() > 0);

    // Resume traversal.
    tm.setBatchHint(5);
View Full Code Here

            nextValue().toString();
        if (!docIdListFirstTraversal.add(docId)) {
          duplicatesFirstTraversal.add(docId);
        }
      }
      String checkpoint = docList.checkpoint();
      assertNotNull("Checkpoint was null", checkpoint);

      // Resume traversal.
      tm.setBatchHint(20);
      docList = tm.resumeTraversal(checkpoint);
View Full Code Here

            nextValue().toString();
        if (!docIdListSecondTraversal.add(docId)) {
          duplicatesSecondTraversal.add(docId);
        }
      }
      String checkpoint = docList.checkpoint();
      assertNotNull("Checkpoint was null", checkpoint);

      // Resume traversal.
      tm.setBatchHint(20);
      docList = tm.resumeTraversal(checkpoint);
View Full Code Here

        push.take(pm);
      }
      String checkpoint = "";
      if (counter != 0) {
        System.out.println("appel checkpoint");
        checkpoint = documentList.checkpoint();
        System.out.println("appel checkpoint " + checkpoint);
      }
      dctmTM.resumeTraversal(checkpoint);
    }
  }
View Full Code Here

        + "lastModified=['2010-04-01 00:01:00','2010-10-27 22:55:03']}";

    DocumentList documentList = mtm.resumeTraversal(checkpoint);
    assertNotNull(documentList);
    assertNull(documentList.nextDocument());
    assertNotNull(documentList.checkpoint()); // It's not MockDocumentList.
    assertEquals(1, mtm.count); // Would have been 2 without the timeout.
  }
}
View Full Code Here

    // time is local time. Should it be UTC?
    SimpleDateFormat iso8601 =
      new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String lastModified = iso8601.format(new Date(260 * 1000));

    checkPoint = propertyMapList.checkpoint();
    assertTrue(checkPoint,
        checkPoint.indexOf("\"uuid\":[\"doc26\"]") != -1);
    assertTrue(checkPoint,
        checkPoint.indexOf("\"lastModified\":[\"" + lastModified + "\"]") != -1);
  }
View Full Code Here

   
    DocumentList docList = new GdDocumentList(items, "right now");
    Document ignoredDocument = null;
   
    ignoredDocument = docList.nextDocument();
    assertEquals("a while ago", docList.checkpoint());
    ignoredDocument = docList.nextDocument();
    assertEquals("just the other day", docList.checkpoint());
    ignoredDocument = docList.nextDocument();
    assertEquals("right now", docList.checkpoint());
  }
View Full Code Here

    Document ignoredDocument = null;
   
    ignoredDocument = docList.nextDocument();
    assertEquals("a while ago", docList.checkpoint());
    ignoredDocument = docList.nextDocument();
    assertEquals("just the other day", docList.checkpoint());
    ignoredDocument = docList.nextDocument();
    assertEquals("right now", docList.checkpoint());
  }
 
  public void testTraversesDocumentsGivenToConstructor()
View Full Code Here

    ignoredDocument = docList.nextDocument();
    assertEquals("a while ago", docList.checkpoint());
    ignoredDocument = docList.nextDocument();
    assertEquals("just the other day", docList.checkpoint());
    ignoredDocument = docList.nextDocument();
    assertEquals("right now", docList.checkpoint());
  }
 
  public void testTraversesDocumentsGivenToConstructor()
  throws RepositoryException {
    Document docA = makeDocument();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.