@Test public void testOOoDatasource() throws Exception { Datasource ds = new OOoDatasource(null, new ConfigThingy("", "NAME \"ooo\" SOURCE \"Bibliography\" TABLE \"biblio\" Schluessel (\"Identifier\")")); assertEquals("ooo", ds.getName()); assertFalse(ds.getSchema().isEmpty()); QueryResults results = ds.getContents(); assertEquals(20, results.size()); results = ds.getDatasetsByKey(List.of("Identifier#ARJ00#")); assertEquals(1, results.size()); Dataset data = results.iterator().next(); assertEquals("Identifier#ARJ00#", data.getKey()); assertEquals("99", data.get("Pages")); assertThrows(ColumnNotFoundException.class, () -> data.get("unknown")); results = ds.find(List.of(new QueryPart("Author", "Gris, Myriam"))); assertEquals(5, results.size()); }
public OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc) { this(nameToDatasource, sourceDesc, false); }
OOoDatasource extends Datasource { public OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc) { this(nameToDatasource, sourceDesc, false); } }
OOoDatasource extends Datasource { public OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc) { this(nameToDatasource, sourceDesc, false); } OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc);  OOoDatasource(Map<String, Datasource> nameToDatasource,
      ConfigThingy sourceDesc, boolean noKey); }
OOoDatasource extends Datasource { public OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc) { this(nameToDatasource, sourceDesc, false); } OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc);  OOoDatasource(Map<String, Datasource> nameToDatasource,
      ConfigThingy sourceDesc, boolean noKey); @Override List<String> getSchema(); @Override QueryResults getDatasetsByKey(Collection<String> keys); @Override QueryResults find(List<QueryPart> query); @Override QueryResults getContents(); @Override String getName(); }
OOoDatasource extends Datasource { public OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc) { this(nameToDatasource, sourceDesc, false); } OOoDatasource(Map<String, Datasource> nameToDatasource, ConfigThingy sourceDesc);  OOoDatasource(Map<String, Datasource> nameToDatasource,
      ConfigThingy sourceDesc, boolean noKey); @Override List<String> getSchema(); @Override QueryResults getDatasetsByKey(Collection<String> keys); @Override QueryResults find(List<QueryPart> query); @Override QueryResults getContents(); @Override String getName();  }