Package com.google.enterprise.connector.spi

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


    Session sessSD = connSD.login();
    TraversalManager tmSD = sessSD.getTraversalManager();

    // Look for any results that are too old
    LivelinkDocumentList results =
        (LivelinkDocumentList) tmSD.startTraversal();
    while (results != null) {
      assertNoResultsOlderThan(results, startDate);
      String checkpoint = results.checkpoint();
      results = (LivelinkDocumentList) tmSD.resumeTraversal(checkpoint);
    }
View Full Code Here


      con.setDataSource(dbType, TestConfiguration.dbs.get(dbType));
      Session s = con.login();
      AuthenticationManager am = s.getAuthenticationManager();
      TraversalManager tm = s.getTraversalManager();
      tm.startTraversal();
     
      // four threads which will be crawling the database simultaneously
      List<TestThread> threads = new ArrayList<TestThread>();
      for (int i = 0; i < 4; ++i) {
        TestThread t = new TestThread(TestConfiguration.d1hostname,
View Full Code Here

  @Override
  public void run() {
    try {
      TraversalManager tm = con.login().getTraversalManager();
      tm.startTraversal();
      for (int i = 1; i < runs; ++i) {
        tm.startTraversal();
      }
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
View Full Code Here

  public void run() {
    try {
      TraversalManager tm = con.login().getTraversalManager();
      tm.startTraversal();
      for (int i = 1; i < runs; ++i) {
        tm.startTraversal();
      }
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

  @Test
  public void testResumeTraversal() throws RepositoryException {
    TraversalManager trav = session.getTraversalManager();
    trav.setBatchHint(500);
    DocumentList docList = trav.startTraversal();
    assertNotNull(docList);
    docList = trav.resumeTraversal("");
    assertNotNull(docList);
  }
View Full Code Here

        "MockRepositoryEventLog1.txt");
    MockRepository r = new MockRepository(mrel);
    QueryManager qm = new MockJcrQueryManager(r.getStore());
    TraversalManager qtm = new JcrTraversalManager(qm);
    MockPusher pusher = new MockPusher(System.out);
    DocumentList documentList = qtm.startTraversal();
    int counter = 0;
    Document document = null;
    while ((document = documentList.nextDocument()) != null) {
      pusher.take(document);
      counter++;
View Full Code Here

        new MockRepositoryEventList("MockRepositoryEventLog1.txt");
    MockRepository r = new MockRepository(mrel);
    QueryManager qm = new MockJcrQueryManager(r.getStore());
    TraversalManager qtm = new JcrTraversalManager(qm);
    {
      DocumentList documentList = qtm.startTraversal();
      int counter = countDocuments(documentList);
      Assert.assertEquals(4, counter);
    }
  }
View Full Code Here

        return supportsInheritedAcls;
      }
    };

    DocPusher dpusher = new DocPusher(feedConnection, dataSource, fsli, dfc);
    DocumentList documentList = qtm.startTraversal();

    Document document = null;
    while ((document = documentList.nextDocument()) != null) {
      assertEquals(PusherStatus.OK, dpusher.take(document, null));
    }
View Full Code Here

      public boolean supportsInheritedAcls() {
        return supportsInheritedAcls;
      }
    };

    DocumentList documentList = qtm.startTraversal();

    int i = 0;
    Document document = null;
    while ((document = documentList.nextDocument()) != null) {
      System.out.println("Test " + i + " output");
View Full Code Here

        "MockRepositoryEventLogBinaryFile.txt");
    MockRepository mockRepo = new MockRepository(eventList);
    MockJcrRepository mockJcrRepo = new MockJcrRepository(mockRepo);
    JcrConnector jcrConn = new JcrConnector(mockJcrRepo);
    TraversalManager travMgr = jcrConn.login().getTraversalManager();
    Document document = travMgr.startTraversal().nextDocument();
    assertEquals("worddoc",
        Value.getSingleValueString(document, SpiConstants.PROPNAME_DOCID));
    Value v = Value.getSingleValue(document, SpiConstants.PROPNAME_CONTENT);
    InputStream contentStream = ((BinaryValue) v).getInputStream();
    InputStream encodedContentStream =
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.