Examples of JcrConnector


Examples of com.google.enterprise.connector.jcr.JcrConnector

   */
  public void setupConnector(String connectorName, String resourceName) {
    MockRepositoryEventList mrel = new MockRepositoryEventList(resourceName);
    MockRepository mockRepository = new MockRepository(mrel);
    Repository repository = new MockJcrRepository(mockRepository);
    Connector connector = new JcrConnector(repository);
    addConnector(connectorName, connector);
  }
View Full Code Here

Examples of com.google.enterprise.connector.jcr.JcrConnector

  public void testTraversal() throws RepositoryLoginException, RepositoryException {
    MockRepositoryEventList mrel =
      new MockRepositoryEventList("MockRepositoryEventLog1.txt");
    MockRepository r = new MockRepository(mrel);
    javax.jcr.Repository jcrRepo = new MockJcrRepository(r);
    Connector repo = new JcrConnector(jcrRepo);
    Session session = repo.login();
    TraversalManager qtm = session.getTraversalManager();
    QueryTraversalUtil.runTraversal(qtm, 2);
  }
View Full Code Here

Examples of com.google.enterprise.connector.jcr.JcrConnector

    // content stream property as it is done during traversal.
    MockRepositoryEventList eventList = new MockRepositoryEventList(
        "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();
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.