executeQuery(test);
}
@Test
public void testFindWildcards() throws IOException, JSONException {
//first a search without wildcards
FindQueryTestCase test = new FindQueryTestCase("cia",
Arrays.asList(
"http://dbpedia.org/resource/Central_Intelligence_Agency",
"http://dbpedia.org/resource/The_World_Factbook"),
Arrays.asList(
"http://dbpedia.org/resource/Ciara"));
test.setField("http://dbpedia.org/ontology/surfaceForm");
test.setLanguage("en");
test.setLimit(5); //there are a lot of those
executeQuery(test);
//now the same search with wildcards
test = new FindQueryTestCase("cia*",
Arrays.asList(
"http://dbpedia.org/resource/Central_Intelligence_Agency",
"http://dbpedia.org/resource/County_Kerry", //Ciarraí (county)
"http://dbpedia.org/resource/Vitamin_C", //Ciamin
"http://dbpedia.org/resource/Ciara",
"http://dbpedia.org/resource/The_World_Factbook")); //CIA World Factbook
test.setField("http://dbpedia.org/ontology/surfaceForm");
test.setLanguage("en");
test.setLimit(10); //there are a lot of those
executeQuery(test);
test = new FindQueryTestCase("proto*",
Arrays.asList(
"http://dbpedia.org/resource/Prototype",
"http://dbpedia.org/resource/Proton",
"http://dbpedia.org/resource/Hypertext_Transfer_Protocol",
"http://dbpedia.org/resource/File_Transfer_Protocol"),
Arrays.asList(
"http://dbpedia.org/resource/Pretoria"));
test.setLanguage("en");
test.setLimit(100); //there a a lot of those
executeQuery(test);
//now the same search with wildcards
test = new FindQueryTestCase("pr?to*",
Arrays.asList(
"http://dbpedia.org/resource/Pretoria",
"http://dbpedia.org/resource/Prototype",
"http://dbpedia.org/resource/Proton",
"http://dbpedia.org/resource/Program_and_System_Information_Protocol",
"http://dbpedia.org/resource/Hypertext_Transfer_Protocol"));
test.setLanguage("en");
test.setLimit(100); //there a a lot of those
executeQuery(test);
}