Examples of DocumentList

Boundary cases are important for {@link #checkpoint()}: The typical pattern for consuming an object that implements this interface is as follows (disregarding exception handling):
 DocumentList docList = ... Document doc; while (doc = docList.nextDocument()) { handleDoc(doc); if (whatever reason) break; } String check = doclist.checkpoint(); 
Note: because of the restriction that the next call to {@link #nextDocument()} invalidates the previous Document, and thereare similar restrictions in the {@link Document} interface, it is possibleto provide a single stateful object that implements {@link DocumentList}, {@link Document} and {@link Property}, by returning {@code this}(or {@code null}) to all calls to {@link #nextDocument()} and{@link Document#findProperty(String)}. However, if preferred, the implementor may also use separate objects for each of those interfaces. @since 1.0
  • edu.harvard.wcfia.yoshikoder.document.DocumentList
    @author will
  • org.openntf.domino.impl.DocumentList

  • Examples of com.google.enterprise.connector.spi.DocumentList

        ICollection collecToAdd = null;
        ICollection collecToDel = null;
        ICollection collecAclToModify = null;
        ISession session = null;

        DocumentList documentList = null;

        try {
          session = sessionManager.getSession(docbase);

          if (checkpoint.getInsertIndex() == -1) {
    View Full Code Here

    Examples of com.google.enterprise.connector.spi.DocumentList

        Session sess = (DctmSession) connector.login();
        qtm = (DctmTraversalManager) sess.getTraversalManager();
      }

      public void testStartTraversal() throws RepositoryException {
        DocumentList list = null;
        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

    Examples of com.google.enterprise.connector.spi.DocumentList

        }
        assertEquals(DmInitialize.DM_RETURN_TOP_UNBOUNDED, counter);
      }

      public void testResumeTraversal() throws RepositoryException {
        DocumentList propertyMapList = null;

        String checkPoint = DmInitialize.DM_CHECKPOINT;

        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

    Examples of com.google.enterprise.connector.spi.DocumentList

        qtm = (DctmTraversalManager) session.getTraversalManager();
      }

      public void testStartTraversal() throws RepositoryException {
        qtm.setBatchHint(DmInitialize.DM_RETURN_TOP_UNBOUNDED);
        DocumentList documentList = qtm.startTraversal();

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

    Examples of com.google.enterprise.connector.spi.DocumentList

      public void testResumeTraversal() throws RepositoryException {
        String checkPoint =
            "{\"uuid\":\"doc2\",\"lastModified\":\"1969-01-01 01:00:00.010\"}";
        qtm.setBatchHint(DmInitialize.DM_RETURN_TOP_BOUNDED);
        DocumentList documentList = qtm.resumeTraversal(checkPoint);

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

    Examples of com.google.enterprise.connector.spi.DocumentList

      }

      public void testGetDocumentList_start() throws RepositoryException {
        MockTraversalManager mtm = new MockTraversalManager();

        DocumentList documentList = mtm.startTraversal();
        assertNotNull(documentList);
        assertEquals(1, mtm.count);
      }
    View Full Code Here

    Examples of com.google.enterprise.connector.spi.DocumentList

        // The nulls in the checkpoint simulate new content with our execQuery stub.
        MockTraversalManager mtm = new MockTraversalManager();
        String checkpoint =
            "{index:0,uuid:[null,'one'],lastModified=[null,'2010-04-01 00:01:00']}";

        DocumentList documentList = mtm.resumeTraversal(checkpoint);
        assertNotNull(documentList);
        assertEquals(1, mtm.count);
      }
    View Full Code Here

    Examples of com.google.enterprise.connector.spi.DocumentList

      public void testGetDocumentList_resumeSecond() throws RepositoryException {
        MockTraversalManager mtm = new MockTraversalManager();
        String checkpoint =
            "{index:1, uuid:['one'],lastModified=['2010-04-01 00:01:00']}";

        DocumentList documentList = mtm.resumeTraversal(checkpoint);
        assertNotNull(documentList);
        assertEquals(1, mtm.count);
      }
    View Full Code Here

    Examples of com.google.enterprise.connector.spi.DocumentList

        // The nulls in the checkpoint simulate new content with our execQuery stub.
        MockTraversalManager mtm = new MockTraversalManager();
        String checkpoint =
            "{index:0,uuid:['one',null],lastModified=['2010-04-01 00:01:00',null]}";

        DocumentList documentList = mtm.resumeTraversal(checkpoint);
        assertNotNull(documentList);
        assertEquals(2, mtm.count);
      }
    View Full Code Here

    Examples of com.google.enterprise.connector.spi.DocumentList

        // The nulls in the checkpoint simulate new content with our execQuery stub.
        MockTraversalManager mtm = new MockTraversalManager();
        String checkpoint =
            "{index:1,uuid:[null,'one'],lastModified=[null,'2010-04-01 00:01:00']}";

        DocumentList documentList = mtm.resumeTraversal(checkpoint);
        assertNotNull(documentList);
        assertEquals(2, mtm.count);
      }
    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.