Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()


  @Test
  public void testStartTraversal() throws RepositoryException {
    TraversalManager trav = session.getTraversalManager();
    trav.setBatchHint(500);
    DocumentList docList = trav.startTraversal();
    assertNotNull(docList);
    Document doc = docList.nextDocument();
    assertNotNull(doc);
    while (doc != null) {
      Property propDocId = doc.findProperty(SpiConstants.PROPNAME_DOCID);
View Full Code Here


      con.setPassword(TestConfiguration.d1password);
      con.setDataSource(dbType, TestConfiguration.dbs.get(dbType));
      Session s = con.login();
      TraversalManager out = s.getTraversalManager();

      DocumentList result = out.startTraversal();
      assertNull(result.nextDocument());
      assertEquals(AdConstants.CHECKPOINT_VALUE, result.checkpoint());

      result = out.resumeTraversal(AdConstants.CHECKPOINT_VALUE);
      assertNull(result);
View Full Code Here

  @Test
  public void testStartTraversal() throws RepositoryException {
    TraversalManager trav = session.getTraversalManager();
    trav.setBatchHint(500);
    DocumentList docList = trav.startTraversal();
    testUserProfiles(docList);
  }

  @Test
  public void testResumeTraversal_whole() throws RepositoryException {
View Full Code Here

    TraversalManager trav = session.getTraversalManager();
    ArrayList<String> names = new ArrayList<String>();

    int halfSize = EXPECTED_NAMES.size() / 2;
    trav.setBatchHint(halfSize);
    DocumentList docList = trav.startTraversal();
    testUserProfiles(docList, names);
    assertEquals(EXPECTED_NAMES.subList(0, halfSize), names);

    String checkpoint = docList.checkpoint();
    JSONObject jo = new
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.