assertEquals(m.getMetadata("Filename"), "test.txt");
deleteAllFiles("/tmp/test-type");
}
public void testComplexQuery() throws Exception {
StdIngester ingester = new StdIngester(transferServiceFacClass);
//ingest first file
Metadata prodMet = new Metadata();
prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
"./src/testdata/ingest").getCanonicalPath());
prodMet.addMetadata(CoreMetKeys.FILENAME, "test-file-1.txt");
prodMet.addMetadata(CoreMetKeys.PRODUCT_NAME, "TestFile1");
prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
"./src/testdata/ingest/test-file-1.txt"), prodMet);
//ingest second file
prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
prodMet.replaceMetadata(CoreMetKeys.PRODUCT_NAME, "TestFile2");
ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
"./src/testdata/ingest/test-file-2.txt"), prodMet);
//perform complex query
ComplexQuery complexQuery = new ComplexQuery();
List<String> reducedMetadata = new Vector<String>();