Package com.google.enterprise.connector.util.diffing

Examples of com.google.enterprise.connector.util.diffing.DocumentSnapshot


    LOG.log(Level.FINE, "Building document snapshots for {0} rows.",
        rows.size());
    List<DocumentSnapshot> docList = Lists.newArrayList();
    for (Map<String, Object> row : rows) {
      try {
        DocumentSnapshot snapshot = docBuilder.getDocumentSnapshot(row);
        if (snapshot != null) {
          if (LOG.isLoggable(Level.FINER)) {
            LOG.finer("DBSnapshotRepository returns document with docID "
                + snapshot.getDocumentId());
          }
          docList.add(snapshot);
        }
      } catch (DBException e) {
        // See the similar log message in DBSnapshot.getDocumentHandle.
View Full Code Here


    writeAndClose(writer, before);

    SnapshotReader reader =
        new SnapshotReader(new BufferedReader(new StringReader(sw.toString())),
            "test", 8, new MockDocumentSnapshotFactory());
    DocumentSnapshot after = reader.read();
    assertEquals(before, after);
    assertNull(reader.read());
  }
View Full Code Here

    SnapshotReader reader =
        new SnapshotReader(new BufferedReader(new StringReader(sw.toString())),
            "test", 2, new MockDocumentSnapshotFactory());
    for (int k = 0; k < 100; ++k) {
      DocumentSnapshot dss = reader.read();
      assertEquals(before[k], dss);
    }
  }
View Full Code Here

  }

  public void testCount() throws SnapshotStoreException {
    try {
      for (int k = 0; k < 100; ++k) {
        DocumentSnapshot dss = new MockDocumentSnapshot(Integer.toString(k),
            "extra." + k);
        assertEquals(k, writer.getRecordCount());
        writer.write(dss);
        assertEquals(k + 1, writer.getRecordCount());
      }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.diffing.DocumentSnapshot

Copyright © 2018 www.massapicom. 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.