@Override
public void decadeSelected(String uri) {
SearchableObjectArray results = new SearchableObjectArray();
Window window = MainController.getInstance().getWindow();
HistoryArray history = window.getHistory();
String queryText = "SELECT DISTINCT ?actor ?title WHERE { " +
"?film rdf:type <" + uri + "> . " +
"?film dbpedia-owl:starring ?actor . " +
"?actor h2mdb:name ?title . " +
"} ";
ResultSet resultSet = OntologyQueryer.resultQuery(queryText);
while(resultSet.hasNext()) {
QuerySolution solution = resultSet.next();
results.add(new Actor(solution.get("actor").toString(), solution.get("title").toString().replace("@en", "")));
}
Collections.sort(results, new SearchableComparator());
history.add(new SearchResultView(window.getPanelCount(), new SearchController(), results));
}