Examples of InMemoryDataSource


Examples of no.priv.garshol.duke.datasources.InMemoryDataSource

public class InMemoryDataSourceTest {

  @Test
  public void testEmpty() {
    InMemoryDataSource src = new InMemoryDataSource();
    RecordIterator it = src.getRecords();
    assertFalse("empty data source contains records",
                it.hasNext());
  }
View Full Code Here

Examples of no.priv.garshol.duke.datasources.InMemoryDataSource

    Collection<Record> records = new ArrayList();
    records.add(TestUtils.makeRecord("ID", "1"));
    records.add(TestUtils.makeRecord("ID", "2"));
    records.add(TestUtils.makeRecord("ID", "3"));
   
    InMemoryDataSource src = new InMemoryDataSource(records);
    RecordIterator it = src.getRecords();

    assertTrue("record missing", it.hasNext());
    assertEquals("wrong record", it.next().getValue("ID"), "1");
    assertTrue("record missing", it.hasNext());
    assertEquals("wrong record", it.next().getValue("ID"), "2");
View Full Code Here

Examples of no.priv.garshol.duke.datasources.InMemoryDataSource

    config = new ConfigurationImpl();
    config.setProperties(props);
    config.setThreshold(0.85);
    config.setMaybeThreshold(0.8);

    source1 = new InMemoryDataSource();
    source2 = new InMemoryDataSource();
    config.addDataSource(1, source1);
    config.addDataSource(2, source2);
   
    processor = new Processor(config, true);
    processor.addMatchListener(listener);
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.