Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.Document.findProperty()


    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);
    }
    checkpoint = docList.checkpoint();
View Full Code Here


    // 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

    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

    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

    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));
      } else {
View Full Code Here

    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));
      } else {
        assertNull("Has attachment filename " + docId,
            doc.findProperty(NCCONST.PROPNAME_NCATTACHMENTFILENAME));
      }
    }
View Full Code Here

      if (docId.contains(("/$File/"))) {
        assertNotNull("Missing attachment filename " + docId,
            doc.findProperty(NCCONST.PROPNAME_NCATTACHMENTFILENAME));
      } else {
        assertNull("Has attachment filename " + docId,
            doc.findProperty(NCCONST.PROPNAME_NCATTACHMENTFILENAME));
      }
    }
  }
}
View Full Code Here

          // for example, if it receives a shutdown request
          break;
        }
        int k = pm.getPropertyNames().size();
        System.out.println("counter " + counter + ",  num properties " + k);
        System.out.println(pm.findProperty(
            SpiConstants.PROPNAME_DISPLAYURL).nextValue());
        push.take(pm);
      }
      String checkpoint = "";
      if (counter != 0) {
View Full Code Here

    Property prop = null;

    while ((pm = propertyMapList.nextDocument()) != null) {

      assertTrue(pm instanceof DctmSysobjectDocument);
      prop = pm.findProperty(SpiConstants.PROPNAME_DOCID);

      assertNotNull(prop);
      assertEquals("users", prop.nextValue().toString());
      counter++;
      if (counter == 1) {
View Full Code Here

        getDocumentList(data, directAces, defaultAces);

    Document doc = doclist.nextDocument();
    assertTrue(doc instanceof FileDocument);
    Property inheritFrom =
        doc.findProperty(SpiConstants.PROPNAME_ACLINHERITFROM_DOCID);
    assertNull(inheritFrom);
    assertDocContainsDirectDefaultAces(doc, 0);

    assertNull("Document should not have TMPL or FLDR ACL document",
        doclist.nextDocument());
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.