Package com.google.enterprise.connector.spi

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


    tm.setBatchHint(20);
    DocumentList docList = tm.startTraversal();
    assertNotNull("startTraversal returned a null document list", docList);
    while (docList != null) {
      Document doc;
      while (null != (doc = docList.nextDocument())) {
        documents.add((NotesConnectorDocument) doc);
      }
      String checkpoint = docList.checkpoint();
      // Resume traversal.
      tm.setBatchHint(20);
View Full Code Here


    DocumentList docList = tm.startTraversal();
    Document doc;
    String checkpoint = null;
    List<String> docIdList = new ArrayList<String>(10);
    assertNotNull("startTraversal returned a null document list", docList);
    while (null != (doc = docList.nextDocument())) {
      String docId = doc.findProperty(SpiConstants.PROPNAME_DOCID)
          .nextValue().toString();
      assertNotNull("Missing doc id", docId);
      docIdList.add(docId);
    }
View Full Code Here

    assertTrue("No docs found", docIdList.size() > 0);

    // Resume traversal.
    tm.setBatchHint(5);
    docList = tm.resumeTraversal(checkpoint);
    while (null != (doc = docList.nextDocument())) {
      String docId = doc.findProperty(SpiConstants.PROPNAME_DOCID).
          nextValue().toString();
      assertNotNull("Missing doc id", docId);
      assertFalse("Found same docid in new doc list: " + docId,
          docIdList.contains(docId));
View Full Code Here

    // Get the first set of documents.
    tm.setBatchHint(20);
    DocumentList docList = tm.startTraversal();
    while (docList != null) {
      Document doc = null;
      while (null != (doc = docList.nextDocument())) {
        String docId = doc.findProperty(SpiConstants.PROPNAME_DOCID).
            nextValue().toString();
        if (!docIdListFirstTraversal.add(docId)) {
          duplicatesFirstTraversal.add(docId);
        }
View Full Code Here

    // Get the second set of documents.
    tm.setBatchHint(20);
    docList = tm.startTraversal();
    while (docList != null) {
      Document doc = null;
      while (null != (doc = docList.nextDocument())) {
        String docId = doc.findProperty(SpiConstants.PROPNAME_DOCID).
            nextValue().toString();
        if (!docIdListSecondTraversal.add(docId)) {
          duplicatesSecondTraversal.add(docId);
        }
View Full Code Here

    // Get the first set of documents.
    tm.setBatchHint(25);
    DocumentList docList = tm.startTraversal();
    assertNotNull("startTraversal returned a null document list", docList);
    Document doc;
    while (null != (doc = docList.nextDocument())) {
      String docId = doc.findProperty(SpiConstants.PROPNAME_DOCID).
          nextValue().toString();
      if (docId.contains(("/$File/"))) {
        assertNotNull("Missing attachment filename " + docId,
            doc.findProperty(NCCONST.PROPNAME_NCATTACHMENTFILENAME));
View Full Code Here

    int counter = 0;

    while (true) {
      counter = 0;
      Document pm = null;
      while ((pm = documentList.nextDocument()) != null) {
        System.out.println("pm change");
        counter++;

        if (counter == batchHint) {
          System.out.println("counter == batchhint !!!!");
View Full Code Here

    qtm.setBatchHint(DmInitialize.DM_RETURN_TOP_BOUNDED);
    propertyMapList = qtm.resumeTraversal(checkPoint);

    int counter = 0;
    while (propertyMapList.nextDocument() != null) {
      counter++;
    }
    assertEquals(DmInitialize.DM_RETURN_TOP_BOUNDED, counter);
  }
View Full Code Here

    qtm.setBatchHint(1);
    documentList = qtm.resumeTraversal(checkPoint);

    DctmSysobjectDocument map = null;
    while ((map = (DctmSysobjectDocument) documentList.nextDocument()) != null) {
      String docId = map.findProperty(SpiConstants.PROPNAME_DOCID)
          .nextValue().toString();
      String expectedid = "090000018000015e";
      assertEquals(expectedid, docId);
      Value date =
View Full Code Here

    int counter = 0;

    qtm.setBatchHint(DmInitialize.DM_RETURN_TOP_UNBOUNDED);
    list = qtm.startTraversal();

    while (list.nextDocument() != null) {
      counter++;
    }
    assertEquals(DmInitialize.DM_RETURN_TOP_UNBOUNDED, counter);
  }
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.