Examples of SnapshotReader


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

  public void testOneRecord() throws SnapshotStoreException {
    MockDocumentSnapshot before = new MockDocumentSnapshot("0", "0.extra");
    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

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

      iMadeIt = true;
    } finally {
      writer.close();
    }

    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

Examples of com.opengamma.integration.copier.snapshot.reader.SnapshotReader

  @Override
  protected void doRun() throws Exception {
    s_context = getToolContext();
    SnapshotUtils snapshotUtils = SnapshotUtils.of(s_context.getMarketDataSnapshotMaster());
    if (!MarketDataSnapshotToolUtils.handleQueryOptions(snapshotUtils, getCommandLine())) {
      SnapshotReader snapshotReader = constructSnapshotReader(UniqueId.parse(getCommandLine().getOptionValue(
          SNAPSHOT_UID_OPTION)));
      SnapshotWriter snapshotWriter = constructSnapshotWriter(getCommandLine().getOptionValue(FILE_NAME_OPTION));
      SnapshotCopier snapshotCopier = new SimpleSnapshotCopier();
 
      snapshotCopier.copy(snapshotReader, snapshotWriter);
 
      // close the reader and writer
      snapshotReader.close();
      snapshotWriter.close();
    }
    System.exit(0);
  }
View Full Code Here

Examples of com.opengamma.integration.copier.snapshot.reader.SnapshotReader

  @Override
  protected void doRun() throws Exception {
    s_context = getToolContext();

    SnapshotReader snapshotReader = constructSnapshotReader(getCommandLine().getOptionValue(FILE_NAME_OPTION));
    SnapshotWriter snapshotWriter = constructSnapshotWriter();
    SnapshotCopier snapshotCopier = new SimpleSnapshotCopier();

    snapshotCopier.copy(snapshotReader, snapshotWriter);

    // close the reader and writer
    snapshotReader.close();
    snapshotWriter.close();

  }
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.